[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <673705b8.050a0220.1324f8.00a2.GAE@google.com>
Date: Fri, 15 Nov 2024 00:26:32 -0800
From: syzbot <syzbot+73d8fc29ec7cba8286fa@...kaller.appspotmail.com>
To: linux-kernel@...r.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [ntfs3?] general protection fault in pick_link
For archival purposes, forwarding an incoming command email to
linux-kernel@...r.kernel.org.
***
Subject: Re: [syzbot] [ntfs3?] general protection fault in pick_link
Author: lizhi.xu@...driver.com
the symlink inode is corrupted.
#syz test
diff --git a/fs/namei.c b/fs/namei.c
index 4a4a22a08ac2..f5dbccb3aafc 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1844,6 +1844,9 @@ static const char *pick_link(struct nameidata *nd, struct path *link,
if (unlikely(error))
return ERR_PTR(error);
+ if (!S_ISLNK(inode->i_mode))
+ return ERR_PTR(-EINVAL);
+
res = READ_ONCE(inode->i_link);
if (!res) {
const char * (*get)(struct dentry *, struct inode *,
Powered by blists - more mailing lists