CVE-2026-139391

In the Linux kernel, the following vulnerability has been resolved: ocfs2: retain all security xattrs during inode creation When creating a new inode, ocfs2_init_security_get() stores the security xattr returned by the LSM framework in ocfs2_security_xattr_info so that it can be written later within the same transaction. But ocfs2_initxattrs() only ever looks at the first element of the xattr array, and it keeps the name as a bare pointer into memory owned by the security layer instead of copying it. The value, by contrast, is already duplicated with kmemdup(). With stacked LSMs, security_inode_init_security() provides one xattr per LSM, so all labels but the first are silently dropped and never written to disk, leaving newly created files without the security xattrs the other LSMs rely on. The borrowed name is not an outright bug with the LSMs in tree today: security_inode_init_security() frees only ->value once the callback returns, and documents ->name as the attribute name suffix, so the pointer stays valid for as long as ocfs2 uses it. It is fragile though, as an LSM that allocates the name together with the value would turn it into a use-after-free, so the rework below copies the names as well. Fix this by storing copies of all the security xattrs: allocate an array in ocfs2_initxattrs(), copy the names and values, account for all of them in the credit calculations, and write each one in ocfs2_init_security_set(). While at it, switch the allocations from GFP_KERNEL to GFP_NOFS. The callback runs in the inode creation path with the parent directory locked, and the security layer allocates the very same xattr array with GFP_NOFS, so direct reclaim must not be allowed to recurse into the filesystem from here.

Package Linux Kernel
Published 2026-11-30
Last modified 2026-11-30
Patch available
Yes

Affected versions

Linux kernel versions 5.10.181, 5.15.114, 6.1.31, 6.3.5, 6.4 and later are affected. Fixed in 5.10.275, 5.15.226, 6.1.193, 6.6.163, 6.12.119, 6.18.65, 7.3.6, 7.4-rc1 and their respective stable series.

Affected from
≥ 5.10.181 ≥ 5.15.114 ≥ 6.1.31 ≥ 6.3.5 ≥ 6.4
Fixed in
✓ 5.10.275 5.10.x ✓ 5.15.226 5.15.x ✓ 6.1.193 6.1.x ✓ 6.6.163 6.6.x ✓ 6.12.119 6.12.x ✓ 6.18.65 6.18.x ✓ 7.3.6 7.3.x ✓ 7.4-rc1

Frequently asked questions

  • What is CVE-2026-139391?

    CVE-2026-139391 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 5.10.181 onward and has been patched in 5.10.275, 5.15.226, 6.1.193 and others. CVE-2026-139391 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.

  • Is there a patch available for CVE-2026-139391?

    Yes. CVE-2026-139391 has been patched. Fixed versions include 5.10.275, 5.15.226, 6.1.193 and others. If you are running Linux kernel 5.10.181 or later up to the fix versions, apply the relevant patch for your kernel branch.

  • Is CVE-2026-139391 actively exploited?

    No. CVE-2026-139391 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.