From: syzbot <syzbot+63336d70e1af377d7388@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: [PATCH v2] configfs: fix slab-UAF Write in config_item_put
Date: Fri, 23 Oct 2026 11:04:44 -0700 [thread overview]
Message-ID: <6adba1bc.5b36369a.12654e.000b.GAE@google.com> (raw)
In-Reply-To: <6ad2a01a.6814cce4.34c49f.0013.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: [PATCH v2] configfs: fix slab-UAF Write in config_item_put
Author: drifabdelmalekmohamedsaid@gmail.com
#syz test
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index 89178f5d371a..7d746a10c369 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.c
@@ -196,11 +196,26 @@ int configfs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
*
* AV, a thoroughly annoyed bastard.
*/
+
+ /* Put the reference back, retake and check after relocking*/
+ config_item_put(parent_item);
+ parent_item = NULL;
inode_unlock(dir);
ret = get_target(symname, &target_item, &target_sd, dentry->d_sb);
inode_lock(dir);
if (ret)
- goto out_put;
+ goto out_put; /* config_item_put on NULL, no problem */
+
+ if (IS_DEADDIR(dir)) {
+ ret = -ENOENT;
+ goto out_put_target;
+ }
+
+ parent_item = configfs_get_config_item(dentry->d_parent);
+ if (!parent_item) {
+ ret = -ENOENT;
+ goto out_put_target;
+ }
if (dentry->d_inode || d_unhashed(dentry))
ret = -EEXIST;
@@ -218,6 +233,7 @@ int configfs_symlink(const struct mnt_idmap *idmap, struct inode *dir,
target_item);
}
+out_put_target:
configfs_put(target_sd);
config_item_put(target_item);
prev parent reply other threads:[~2026-10-23 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-16 22:07 [syzbot] [fs?] KASAN: slab-use-after-free " syzbot
2026-10-23 18:04 ` syzbot [this message]
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=6adba1bc.5b36369a.12654e.000b.GAE@google.com \
--to=syzbot+63336d70e1af377d7388@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®