mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
minix_rmdir() calls minix_unlink(), which drops the victim's link
count once, and then drops it a second time for the "." entry. An
image where an empty directory has i_nlink < 2 makes the second drop
hit drop_nlink() with i_nlink == 0:
WARNING: fs/inode.c:408 at drop_nlink
minix_rmdir+0xe9/0x150
vfs_rmdir
filename_rmdir
__do_sys_unlinkat
The parent's link count is already validated; do the same for the
directory being removed and fail with -EFSCORRUPTED.
Reported-by: syzbot+8420e667af06b1709c00@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8420e667af06b1709c00
Fixes:
|
||
|---|---|---|
| .. | ||
| bitmap.c | ||
| dir.c | ||
| file.c | ||
| inode.c | ||
| itree_common.c | ||
| itree_v1.c | ||
| itree_v2.c | ||
| Kconfig | ||
| Makefile | ||
| minix.h | ||
| namei.c | ||