diff options
| author | Jake Labelle <southampton.jake.labelle@gmail.com> | 2026-10-08 20:52:47 +0900 |
|---|---|---|
| committer | Viacheslav Dubeyko <slava@dubeyko.com> | 2026-10-08 09:39:43 -0700 |
| commit | ef2ccb1554df254eb4066171ce93e6d5fb1af2e3 (patch) | |
| tree | 7ae9c946896d55d791412e779d84f653768d55b4 /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | 814f5a53b4724798795b15690ff3d1c1d9ac1eb6 (diff) | |
| download | linux-ef2ccb1554df254eb4066171ce93e6d5fb1af2e3.tar.gz linux-ef2ccb1554df254eb4066171ce93e6d5fb1af2e3.zip | |
nilfs2: reject non-regular inodes in dsync recovery
During roll-forward recovery, nilfs_recover_dsync_blocks() obtains the
inode designated by fi_ino of a dsync log without checking its type.
If a corrupted image designates a special inode (e.g. a device node)
there, the inode's embedded bmap was never initialized:
__nilfs_read_inode() calls nilfs_bmap_read() only for regular files,
directories and symlinks. The subsequent nilfs_get_block() then
dereferences the uninitialized bmap->b_ops and jumps through it,
crashing the kernel or worse.
Regular files, directories, and symlinks are the only inode types
with data blocks to recover; reject anything else before touching
its block mapping.
[ryusuke: conformed AI tag to guidelines]
Fixes: 0f3e1c7f23f8 ("nilfs2: recovery functions")
Assisted-by: Claude:claude-mythos-5
Signed-off-by: Jake Labelle <southampton.jake.labelle@gmail.com>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Viacheslav Dubeyko <slava@dubeyko.com>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
