All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+73d8fc29ec7cba8286fa@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [syzbot] Re: [syzbot] [ntfs3?] general protection fault in pick_link
Date: Fri, 15 Nov 2024 00:26:32 -0800	[thread overview]
Message-ID: <673705b8.050a0220.1324f8.00a2.GAE@google.com> (raw)
In-Reply-To: <67363c96.050a0220.1324f8.009e.GAE@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.

***

Subject: Re: [syzbot] [ntfs3?] general protection fault in pick_link
Author: lizhi.xu@windriver.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 *,

  reply	other threads:[~2024-11-15  8:26 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 18:08 [syzbot] [ntfs3?] general protection fault in pick_link syzbot
2024-11-15  8:26 ` syzbot [this message]
2024-11-15  9:49 ` [PATCH] fs: add check for symlink corrupted Lizhi Xu
2024-11-15 11:43   ` Jan Kara
2024-11-16  1:02     ` Lizhi Xu
2024-11-16  1:25       ` Al Viro
2024-11-15 13:06   ` Al Viro
2024-11-15 13:24     ` Al Viro
2024-11-16  1:39       ` Lizhi Xu
2024-11-16  2:32         ` Al Viro
2024-11-19 11:29           ` [PATCH V2] fs: improve the check of whether i_link has been set Lizhi Xu
2024-11-19 16:36             ` Al Viro
2024-11-20  3:04               ` [PATCH V3] fs/ntfs3: check if the inode is bad before creating symlink Lizhi Xu
2024-11-20 16:10                 ` Al Viro
2024-11-21  3:13                   ` Lizhi Xu
2024-11-21  3:55                     ` Al Viro
2024-11-21  5:27                       ` Lizhi Xu
2024-11-22  7:49                   ` Lizhi Xu
2024-11-22  8:10                     ` [PATCH V4] " Lizhi Xu
2024-11-22 11:50                       ` Jan Kara
2024-11-23  1:09                     ` [PATCH V5] " Lizhi Xu
2024-11-23  1:32                       ` Al Viro
2024-11-24  4:43                         ` [PATCH V6] fs/ntfs3: check if the inode is bad before instantiating dentry Lizhi Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=673705b8.050a0220.1324f8.00a2.GAE@google.com \
    --to=syzbot+73d8fc29ec7cba8286fa@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.