diff options
| author | Joseph Qi <joseph.qi@linux.alibaba.com> | 2026-04-03 17:08:02 +0800 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-04-15 02:15:02 -0700 |
| commit | af5e456c0b1930546c39cb785d120c2d54268d9c (patch) | |
| tree | b6b675ad747d4f35d7acc72980228ef055745d89 /kernel/stacktrace.c | |
| parent | 4ae9cca37e328637cf837ac73f6b8b529f4a918d (diff) | |
| download | lwn-af5e456c0b1930546c39cb785d120c2d54268d9c.tar.gz lwn-af5e456c0b1930546c39cb785d120c2d54268d9c.zip | |
ocfs2: validate extent block list fields during block read
Add extent list validation to ocfs2_validate_extent_block() so that
corrupted on-disk fields are caught early at block read time rather than
during extent tree traversal.
Two checks are added:
- l_count must equal the expected value from
ocfs2_extent_recs_per_eb(), catching blocks with a corrupted record
count before any array iteration.
- l_next_free_rec must not exceed l_count, preventing out-of-bounds
access when iterating over extent records.
Link: https://lkml.kernel.org/r/20260403090803.3860971-4-joseph.qi@linux.alibaba.com
Signed-off-by: Joseph Qi <joseph.qi@linux.alibaba.com>
Reviewed-by: Heming Zhao <heming.zhao@suse.com>
Cc: Changwei Ge <gechangwei@live.cn>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Jun Piao <piaojun@huawei.com>
Cc: Junxiao Bi <junxiao.bi@oracle.com>
Cc: Mark Fasheh <mark@fasheh.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel/stacktrace.c')
0 files changed, 0 insertions, 0 deletions
