linux/fs/minix
Jori Koolstra 009a2ba403
Fix a drop_nlink warning in minix_rename
Syzbot found a drop_nlink warning that is triggered by an easy to
detect nlink corruption. This patch adds sanity checks to minix_unlink
and minix_rename to prevent the warning and instead return EFSCORRUPTED
to the caller.

The changes were tested using the syzbot reproducer as well as local
testing.

Signed-off-by: Jori Koolstra <jkoolstra@xs4all.nl>
Link: https://patch.msgid.link/20251104143005.3283980-4-jkoolstra@xs4all.nl
Reviewed-by: Jan Kara <jack@suse.cz>
Reported-by: syzbot+a65e824272c5f741247d@syzkaller.appspotmail.com
Closes: https://syzbot.org/bug?extid=a65e824272c5f741247d
Signed-off-by: Christian Brauner <brauner@kernel.org>
2025-11-05 13:45:21 +01:00
..
bitmap.c minix: convert to new timestamp accessors 2023-10-18 14:08:23 +02:00
dir.c fs: Remove three arguments from block_write_end() 2025-06-24 15:53:40 +02:00
file.c fs: convert simple use of generic_file_*_mmap() to .mmap_prepare() 2025-06-17 13:47:45 +02:00
inode.c Add error handling to minix filesystem for inode corruption detection 2025-11-05 13:45:21 +01:00
itree_common.c minix: convert to new timestamp accessors 2023-10-18 14:08:23 +02:00
itree_v1.c fs/minix: remove expected error message in block_to_path() 2020-08-12 10:58:00 -07:00
itree_v2.c fs/minix: remove expected error message in block_to_path() 2020-08-12 10:58:00 -07:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
minix.h Add error handling to minix filesystem for inode corruption detection 2025-11-05 13:45:21 +01:00
namei.c Fix a drop_nlink warning in minix_rename 2025-11-05 13:45:21 +01:00