[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618045016.GO1880847@ZenIV>
Date: Wed, 18 Jun 2025 05:50:16 +0100
From: Al Viro <viro@...iv.linux.org.uk>
To: Edward Adam Davis <eadavis@...com>
Cc: syzbot+1aa90f0eb1fc3e77d969@...kaller.appspotmail.com,
almaz.alexandrovich@...agon-software.com, brauner@...nel.org,
jack@...e.cz, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, ntfs3@...ts.linux.dev,
syzkaller-bugs@...glegroups.com
Subject: Re: [PATCH] fs: Prevent non-symlinks from entering pick link
On Wed, Jun 18, 2025 at 11:30:48AM +0800, Edward Adam Davis wrote:
> The reproducer uses a file0 on a ntfs3 file system with a corrupted i_link.
> When renaming, the file0's inode is marked as a bad inode because the file
> name cannot be deleted. However, before renaming, file0 is a directory.
> After the renaming fails, it is marked as a bad inode, which makes it a
> regular file. In any case, when opening it after creating a hard link,
> pick_link() should not be entered because it is not a symbolic link from
> beginning to end.
>
> Add a check on the symbolic link before entering pick_link() to avoid
> triggering unknown exceptions when performing the i_link acquisition
> operation on other types of files.
>
> Reported-by: syzbot+1aa90f0eb1fc3e77d969@...kaller.appspotmail.com
> Closes: https://syzkaller.appspot.com/bug?extid=1aa90f0eb1fc3e77d969
> Tested-by: syzbot+1aa90f0eb1fc3e77d969@...kaller.appspotmail.com
> Signed-off-by: Edward Adam Davis <eadavis@...com>
NAK. This is not the first time that garbage is suggested and no,
we are not going to paper over that shite in fs/namei.c.
Not going to happen.
You ARE NOT ALLOWED to call make_bad_inode() on a live inode, period.
Never, ever to be done.
There's a lot of assertions it violates and there's no chance in
hell to plaster each with that kind of checks.
Fix NTFS. End of story.
Powered by blists - more mailing lists