All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+63336d70e1af377d7388@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH v1] configfs: fix slab-UAF Write in config_item_put
Date: Sun, 25 Oct 2026 08:14:02 -0700	[thread overview]
Message-ID: <6ade1cba.a6443767.132891.002f.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, syzkaller-bugs@googlegroups.com.

***

Subject: [PATCH v1] 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 */
+
+ 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);

      parent reply	other threads:[~2026-10-25 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 22:07 [syzbot] [fs?] KASAN: slab-use-after-free Write in config_item_put syzbot
2026-10-23 18:04 ` Forwarded: [PATCH v2] configfs: fix slab-UAF " syzbot
2026-10-25 15:14 ` 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=6ade1cba.a6443767.132891.002f.GAE@google.com \
    --to=syzbot+63336d70e1af377d7388@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /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.