UBUNTU-CVE-2026-97949: Use After Free
In the Linux kernel, the following vulnerability has been resolved: configfs: unhash the dentry before dropping the item in rmdir configfsgetconfigitem() treats a hashed dentry as proof that sd->selement is a live configitem. configfsrmdir() breaks that: simplermdir() leaves the dentry hashed, the last reference to the item is dropped right after, and the dentry is only unhashed by ddelete() once ->rmdir() has returned. configfssymlink() resolves its target holding no lock on it, so gettarget() can land in that window: BUG: KASAN: slab-use-after-free in configitemget+0x26/0x90 gettarget fs/configfs/symlink.c:128 [inline] configfssymlink+0x4ab/0x1030 fs/configfs/symlink.c:185 Unhash in configfsremovedir(), while the item is still guaranteed to be there. A reference obtained just before that stays harmless, as createlink() rechecks CONFIGFSUSETDROPPING, already set by configfsdetachprep(). Both configfsunregistersubsystem() paths ddrop() after detaching, so this only makes rmdir match them.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
In configfs_remove_dir(), unhash the dentry before dropping the config item, while the item is still guaranteed to be present.