<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/configfs, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-09-07T16:15:05+00:00</updated>
<entry>
<title>configfs: unhash the dentry before dropping the item in rmdir</title>
<updated>2026-09-07T16:15:05+00:00</updated>
<author>
<name>Vasileios Almpanis</name>
<email>vasilisalmpanis@gmail.com</email>
</author>
<published>2026-07-30T09:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=f06c2d26d1999d37e93299db0ecead04ca7d0b9f'/>
<id>urn:sha1:f06c2d26d1999d37e93299db0ecead04ca7d0b9f</id>
<content type='text'>
configfs_get_config_item() treats a hashed dentry as proof that
sd-&gt;s_element is a live config_item.  configfs_rmdir() breaks that:
simple_rmdir() leaves the dentry hashed, the last reference to the item is
dropped right after, and the dentry is only unhashed by d_delete() once
-&gt;rmdir() has returned.  configfs_symlink() resolves its target holding no
lock on it, so get_target() can land in that window:

  BUG: KASAN: slab-use-after-free in config_item_get+0x26/0x90
   get_target fs/configfs/symlink.c:128 [inline]
   configfs_symlink+0x4ab/0x1030 fs/configfs/symlink.c:185

Unhash in configfs_remove_dir(), while the item is still guaranteed to be
there.  A reference obtained just before that stays harmless, as
create_link() rechecks CONFIGFS_USET_DROPPING, already set by
configfs_detach_prep().  Both configfs_unregister_subsystem() paths
d_drop() after detaching, so this only makes rmdir match them.

Reported-by: syzbot+6b16e3d085833cbf3e25@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=6b16e3d085833cbf3e25
Fixes: 7063fbf22611 ("[PATCH] configfs: User-driven configuration filesystem")
Cc: stable@vger.kernel.org
Signed-off-by: Vasileios Almpanis &lt;vasilisalmpanis@gmail.com&gt;
Tested-by: Breno Leitao &lt;leitao@debian.org&gt;
Reviewed-by: Breno Leitao &lt;leitao@debian.org&gt;
Link: https://patch.msgid.link/20260730093435.195441-3-vasilisalmpanis@gmail.com
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
</content>
</entry>
<entry>
<title>configfs: pin the symlink target's dirent instead of chasing -&gt;ci_dentry</title>
<updated>2026-09-07T16:14:59+00:00</updated>
<author>
<name>Vasileios Almpanis</name>
<email>vasilisalmpanis@gmail.com</email>
</author>
<published>2026-07-30T09:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a7c1290eef60711c10289c056ad32ed1f2b47b12'/>
<id>urn:sha1:a7c1290eef60711c10289c056ad32ed1f2b47b12</id>
<content type='text'>
create_link() reads the target's configfs_dirent from
item-&gt;ci_dentry-&gt;d_fsdata, relying on the item reference taken by
get_target().  That reference pins the item, not its dentry: the dentry is
pinned by DCACHE_PERSISTENT, which configfs_remove_dir() releases via
simple_rmdir() while the item is still alive.  A symlink racing with rmdir
of its target can therefore find -&gt;ci_dentry freed and its dirent
released, triggering WARN_ON(!atomic_read(&amp;sd-&gt;s_count)) in configfs_get().

Take the dirent in get_target() as well, under -&gt;d_lock and atomically
with the item reference, and pass it down to create_link().  A hashed
dentry has not been killed yet, so its -&gt;d_fsdata reference keeps the
dirent alive there.

Cc: stable@vger.kernel.org
Fixes: 7063fbf22611 ("[PATCH] configfs: User-driven configuration filesystem")
Signed-off-by: Vasileios Almpanis &lt;vasilisalmpanis@gmail.com&gt;
Tested-by: Breno Leitao &lt;leitao@debian.org&gt;
Reviewed-by: Breno Leitao &lt;leitao@debian.org&gt;
Link: https://patch.msgid.link/20260730093435.195441-2-vasilisalmpanis@gmail.com
Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
</content>
</entry>
<entry>
<title>configfs: move CONFIGFS_MAGIC definition to magic.h</title>
<updated>2026-09-02T02:28:55+00:00</updated>
<author>
<name>Frederick Lawler</name>
<email>fred@cloudflare.com</email>
</author>
<published>2026-08-19T23:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ab84c314417e4743f72f4d3d5e58cf96e07213cc'/>
<id>urn:sha1:ab84c314417e4743f72f4d3d5e58cf96e07213cc</id>
<content type='text'>
IMA shouldn't measure or appraise configfs, but currently does because
it's missing from the default exclusion policies. Move CONFIGFS_MAGIC to
magic.h to expose the file system's magic to IMA, as well as other userland
applications.

Suggested-by: Mimi Zohar &lt;zohar@linux.ibm.com&gt;
Signed-off-by: Frederick Lawler &lt;fred@cloudflare.com&gt;
Acked-by: Breno Leitao &lt;leitao@debian.org&gt;
Signed-off-by: Mimi Zohar &lt;zohar@linux.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'pull-configfs-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2026-06-14T22:58:20+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-06-14T22:58:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=de02909ae81aa4fda213d16915adb5e1b088a7db'/>
<id>urn:sha1:de02909ae81aa4fda213d16915adb5e1b088a7db</id>
<content type='text'>
Pull configfs updates from Al Viro:
 "A couple of fixes (UAF in configfs_lookup() and really old races
  introduced when lseek() on configfs directories stopped locking those
  directories; impact up to and including UAF).

  Fixes aside, the main result is that configfs is finally switched to
  tree-in-dcache machinery. It's *not* making use of recursive removal
  helpers yet, and it still does the bloody awful "build subtree in full
  sight of userland, with possibility of failure halfway through and
  need to unroll" that forces the locking model from hell; dealing with
  that is a separate patch series, once this one is out of the way.
  However, it is using DCACHE_PERSISTENT properly now. And apparmorfs is
  the sole remaining user of __simple_{unlink,rmdir}() at that point"

* tag 'pull-configfs-fixed' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  create_default_group(): pass parent's dentry instead of config_group
  configfs_attach_group(): drop the unused parent_item argument
  configs_attach_item(): drop unused parent_item argument
  configfs_create(): lift parent timestamp updates into callers
  kill configfs_drop_dentry()
  configfs: mark pinned dentries persistent
  configfs: dentry refcount needs to be pinned only once
  switch configfs_detach_{group,item}() to passing dentry
  configfs_remove_dir(), detach_attrs(): switch to passing dentry
  populate_attrs(): move cleanup to the sole caller
  populate_group(): move cleanup on failure to the sole caller
  configfs_detach_rollback(): pass configfs_dirent instead of dentry
  configfs_do_depend_item(): pass configfs_dirent instead of dentry
  configfs_depend_prep(): pass configfs_dirent instead of dentry
  configfs_detach_prep(): pass configfs_dirent instead of dentry
  configfs_mkdir(): use take_dentry_name_snapshot()
  configfs: fix lockless traversals of -&gt;s_children
  configfs_lookup(): don't leave -&gt;s_dentry dangling on failure
</content>
</entry>
<entry>
<title>Merge tag 'pull-d_add' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs</title>
<updated>2026-06-14T22:51:00+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-06-14T22:51:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=8ab34af09f292ca9620dad8df253fec766729b29'/>
<id>urn:sha1:8ab34af09f292ca9620dad8df253fec766729b29</id>
<content type='text'>
Pull dentry d_add() cleanups from Al Viro:
 "This converts a bunch of unidiomatic uses of d_add() in -&gt;lookup()
  instances to equivalent uses of d_splice_alias(), which is the normal
  mechanism for -&gt;lookup()"

* tag 'pull-d_add' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  gfs2: use d_splice_alias() for -&gt;lookup() return value
  ntfs: use d_splice_alias() for -&gt;lookup() return value
  simple_lookup(): use d_splice_alias() for -&gt;lookup() return value
  ecryptfs: use d_splice_alias() for -&gt;lookup() return value
  configfs_lookup(): switch to d_splice_alias()
  tracefs: use d_splice_alias() in -&gt;lookup() instances
</content>
</entry>
<entry>
<title>create_default_group(): pass parent's dentry instead of config_group</title>
<updated>2026-06-08T18:55:02+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2026-05-26T23:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d53ac61b6120fa596d758ff6e22b5dcb6db21ce8'/>
<id>urn:sha1:d53ac61b6120fa596d758ff6e22b5dcb6db21ce8</id>
<content type='text'>
the only way parent_group is used there...

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>configfs_attach_group(): drop the unused parent_item argument</title>
<updated>2026-06-08T18:54:40+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2026-05-26T23:19:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ad235a65dfff7e2e559fbcfe0f600d58b7df2396'/>
<id>urn:sha1:ad235a65dfff7e2e559fbcfe0f600d58b7df2396</id>
<content type='text'>
This one *was* used - for passing it to configfs_attach_item(), which
didn't use the value passed to it.

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>configs_attach_item(): drop unused parent_item argument</title>
<updated>2026-06-08T18:54:05+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2026-05-26T23:16:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d4152c7562a8759ef98f882385121b8dee04606d'/>
<id>urn:sha1:d4152c7562a8759ef98f882385121b8dee04606d</id>
<content type='text'>
That argument has been unused since the initial merge in 2005.

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>configfs_create(): lift parent timestamp updates into callers</title>
<updated>2026-06-08T18:53:41+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2026-05-19T03:48:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=967c898d9defb5b6855ea9325eb2dda3b7f06bab'/>
<id>urn:sha1:967c898d9defb5b6855ea9325eb2dda3b7f06bab</id>
<content type='text'>
... and do *not* do it in -&gt;lookup() case.  stat foo/bar
should not update mtime of foo, TYVM...

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>kill configfs_drop_dentry()</title>
<updated>2026-06-08T18:53:14+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2026-05-12T16:53:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=43b45755e80e5eee9d3f6271d301940af7dbc29b'/>
<id>urn:sha1:43b45755e80e5eee9d3f6271d301940af7dbc29b</id>
<content type='text'>
Fold into the only remaining user, don't bother with the timestamps
of parent - we are going to rmdir it shortly anyway, which will
override those.

Fix the locking of inode, while we are at it - updating the link
count and timestamps ought to be done with the inode locked.

Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
</feed>
