Skip to contentSkip to conversation

CVE-2026-98921: ovl: fix UAF in ovl_do_mkdir() debug print

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Oct 23

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

ovl: fix UAF in ovl_do_mkdir() debug print

ovl_do_mkdir() prints the input dentry with %pd after vfs_mkdir(). Since commit fe497f0759e0 ("VFS: change vfs_mkdir() to unlock on failure."), vfs_mkdir() calls end_creating() on the input dentry on failure and may replace it on success, so the post-call %pd can use-after-free the dentry when CONFIG_OVERLAY_FS_DEBUG is enabled.

Print the dentry before the call and only the result afterward.

The Linux kernel CVE team has assigned CVE-2026-98921 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.19 with commit fe497f0759e0efb949f9480911d00b6045c21f50 and fixed in 7.2.9 with commit 719bd33ab359c539a68a278c15a97deb77565cdb
	Issue introduced in 6.19 with commit fe497f0759e0efb949f9480911d00b6045c21f50 and fixed in 7.3 with commit ae146bc1abdeb4607abf2975b858c053024e8ac1

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-98921

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
fs/overlayfs/overlayfs.h

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/719bd33ab359c539a68a278c15a97deb77565cdb
	https://git.kernel.org/stable/c/ae146bc1abdeb4607abf2975b858c053024e8ac1