aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@gmail.com>2022-10-02 12:08:04 +0900
committerAndrew Morton <akpm@linux-foundation.org>2022-10-11 19:05:45 -0700
commit21a87d88c2253350e115029f14fe2a10a7e6c856 (patch)
tree9462cceadbe4c3ab0016217057cec111cf86e75d /fs/nilfs2/segment.c
parentnilfs2: fix use-after-free bug of struct nilfs_root (diff)
downloadlinux-dev-21a87d88c2253350e115029f14fe2a10a7e6c856.tar.xz
linux-dev-21a87d88c2253350e115029f14fe2a10a7e6c856.zip
nilfs2: fix NULL pointer dereference at nilfs_bmap_lookup_at_level()
If the i_mode field in inode of metadata files is corrupted on disk, it can cause the initialization of bmap structure, which should have been called from nilfs_read_inode_common(), not to be called. This causes a lockdep warning followed by a NULL pointer dereference at nilfs_bmap_lookup_at_level(). This patch fixes these issues by adding a missing sanitiy check for the i_mode field of metadata file's inode. Link: https://lkml.kernel.org/r/20221002030804.29978-1-konishi.ryusuke@gmail.com Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Reported-by: syzbot+2b32eb36c1a825b7a74c@syzkaller.appspotmail.com Reported-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Tested-by: Ryusuke Konishi <konishi.ryusuke@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'fs/nilfs2/segment.c')
0 files changed, 0 insertions, 0 deletions