]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
f2fs: fix to detect potential corrupted nid in free_nid_list
authorChao Yu <chao@kernel.org>
Thu, 7 Aug 2025 02:44:31 +0000 (10:44 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Wed, 20 Aug 2025 17:44:09 +0000 (17:44 +0000)
commit8fc6056dcf79937c46c97fa4996cda65956437a9
tree18d5ed9da23efbdf90e4b2c3b4b5839444758528
parent2e8f4c2b2bb12fc3d40762f1bb778e95c6ddbc93
f2fs: fix to detect potential corrupted nid in free_nid_list

As reported, on-disk footer.ino and footer.nid is the same and
out-of-range, let's add sanity check on f2fs_alloc_nid() to detect
any potential corruption in free_nid_list.

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c
include/linux/f2fs_fs.h