{"api_version":"1","generated_at":"2026-11-30T18:30:36+00:00","cve":"CVE-2026-139391","urls":{"html":"https://cve.report/CVE-2026-139391","api":"https://cve.report/api/cve/CVE-2026-139391.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2026-139391","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2026-139391"},"summary":{"title":"ocfs2: retain all security xattrs during inode creation","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: retain all security xattrs during inode creation\n\nWhen creating a new inode, ocfs2_init_security_get() stores the security\nxattr returned by the LSM framework in ocfs2_security_xattr_info so that\nit can be written later within the same transaction.  But\nocfs2_initxattrs() only ever looks at the first element of the xattr\narray, and it keeps the name as a bare pointer into memory owned by the\nsecurity layer instead of copying it.  The value, by contrast, is already\nduplicated with kmemdup().\n\nWith stacked LSMs, security_inode_init_security() provides one xattr per\nLSM, so all labels but the first are silently dropped and never written to\ndisk, leaving newly created files without the security xattrs the other\nLSMs rely on.\n\nThe borrowed name is not an outright bug with the LSMs in tree today:\nsecurity_inode_init_security() frees only ->value once the callback\nreturns, and documents ->name as the attribute name suffix, so the pointer\nstays valid for as long as ocfs2 uses it.  It is fragile though, as an LSM\nthat allocates the name together with the value would turn it into a\nuse-after-free, so the rework below copies the names as well.\n\nFix this by storing copies of all the security xattrs: allocate an array\nin ocfs2_initxattrs(), copy the names and values, account for all of them\nin the credit calculations, and write each one in\nocfs2_init_security_set().\n\nWhile at it, switch the allocations from GFP_KERNEL to GFP_NOFS.  The\ncallback runs in the inode creation path with the parent directory locked,\nand the security layer allocates the very same xattr array with GFP_NOFS,\nso direct reclaim must not be allowed to recurse into the filesystem from\nhere.","state":"PUBLISHED","assigner":"Linux","published_at":"2026-11-30 14:19:07","updated_at":"2026-11-30 14:19:07"},"problem_types":[],"metrics":[],"references":[{"url":"https://git.kernel.org/stable/c/5c815fd8de4a7e935b287ebf980121876f229b76","name":"https://git.kernel.org/stable/c/5c815fd8de4a7e935b287ebf980121876f229b76","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/3a6df319db221e1bc4eb0ce22218c904512b1f60","name":"https://git.kernel.org/stable/c/3a6df319db221e1bc4eb0ce22218c904512b1f60","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ce055a1378e5b4e8fcaf1c8dc4df82c326bf9306","name":"https://git.kernel.org/stable/c/ce055a1378e5b4e8fcaf1c8dc4df82c326bf9306","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/ae8ee59668124a4a544996727067cc5ae20af6dd","name":"https://git.kernel.org/stable/c/ae8ee59668124a4a544996727067cc5ae20af6dd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/5bc277c89570e096c574188dcfdd538e3c139bd1","name":"https://git.kernel.org/stable/c/5bc277c89570e096c574188dcfdd538e3c139bd1","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/d637475617d8468c2740a3436428681bcc8d3572","name":"https://git.kernel.org/stable/c/d637475617d8468c2740a3436428681bcc8d3572","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/314f6183f13fda459261a4723a453df67e15008b","name":"https://git.kernel.org/stable/c/314f6183f13fda459261a4723a453df67e15008b","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://git.kernel.org/stable/c/1b9930ebec9dc92b3cce3231dcb9ed8ebd5da7dd","name":"https://git.kernel.org/stable/c/1b9930ebec9dc92b3cce3231dcb9ed8ebd5da7dd","refsource":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","tags":[],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-139391","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-139391","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected c41324385aa7c9ac0fc1fa9c2521aacedea24788 ce055a1378e5b4e8fcaf1c8dc4df82c326bf9306 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 291fe3d6f5dbafa6dd87a510c1351e8ce8a8a52e 1b9930ebec9dc92b3cce3231dcb9ed8ebd5da7dd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 8bdf47f9dbeac6b247c8f14fbaebfe020d9a2ffa ae8ee59668124a4a544996727067cc5ae20af6dd git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected de3004c874e740304cc4f4a83d6200acb511bbda 3a6df319db221e1bc4eb0ce22218c904512b1f60 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected de3004c874e740304cc4f4a83d6200acb511bbda 5c815fd8de4a7e935b287ebf980121876f229b76 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected de3004c874e740304cc4f4a83d6200acb511bbda 5bc277c89570e096c574188dcfdd538e3c139bd1 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected de3004c874e740304cc4f4a83d6200acb511bbda 314f6183f13fda459261a4723a453df67e15008b git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected de3004c874e740304cc4f4a83d6200acb511bbda d637475617d8468c2740a3436428681bcc8d3572 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 0c80524f34e66fed0bc837758c5a80b1527847a4 git","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.10.181 5.10.275 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 5.15.114 5.15.226 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.1.31 6.1.193 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.3.5 6.4 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"affected 6.4","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.4 semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.10.275 5.10.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 5.15.226 5.15.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.1.193 6.1.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.6.163 6.6.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.12.119 6.12.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 6.18.65 6.18.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.3.6 7.3.* semver","platforms":[]},{"source":"CNA","vendor":"Linux","product":"Linux","version":"unaffected 7.4-rc1 * original_commit_for_fix","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[]},"source_records":{"cve_program":{"containers":{"cna":{"affected":[{"defaultStatus":"unaffected","product":"Linux","programFiles":["fs/ocfs2/namei.c","fs/ocfs2/xattr.c","fs/ocfs2/xattr.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"lessThan":"ce055a1378e5b4e8fcaf1c8dc4df82c326bf9306","status":"affected","version":"c41324385aa7c9ac0fc1fa9c2521aacedea24788","versionType":"git"},{"lessThan":"1b9930ebec9dc92b3cce3231dcb9ed8ebd5da7dd","status":"affected","version":"291fe3d6f5dbafa6dd87a510c1351e8ce8a8a52e","versionType":"git"},{"lessThan":"ae8ee59668124a4a544996727067cc5ae20af6dd","status":"affected","version":"8bdf47f9dbeac6b247c8f14fbaebfe020d9a2ffa","versionType":"git"},{"lessThan":"3a6df319db221e1bc4eb0ce22218c904512b1f60","status":"affected","version":"de3004c874e740304cc4f4a83d6200acb511bbda","versionType":"git"},{"lessThan":"5c815fd8de4a7e935b287ebf980121876f229b76","status":"affected","version":"de3004c874e740304cc4f4a83d6200acb511bbda","versionType":"git"},{"lessThan":"5bc277c89570e096c574188dcfdd538e3c139bd1","status":"affected","version":"de3004c874e740304cc4f4a83d6200acb511bbda","versionType":"git"},{"lessThan":"314f6183f13fda459261a4723a453df67e15008b","status":"affected","version":"de3004c874e740304cc4f4a83d6200acb511bbda","versionType":"git"},{"lessThan":"d637475617d8468c2740a3436428681bcc8d3572","status":"affected","version":"de3004c874e740304cc4f4a83d6200acb511bbda","versionType":"git"},{"status":"affected","version":"0c80524f34e66fed0bc837758c5a80b1527847a4","versionType":"git"},{"lessThan":"5.10.275","status":"affected","version":"5.10.181","versionType":"semver"},{"lessThan":"5.15.226","status":"affected","version":"5.15.114","versionType":"semver"},{"lessThan":"6.1.193","status":"affected","version":"6.1.31","versionType":"semver"},{"lessThan":"6.4","status":"affected","version":"6.3.5","versionType":"semver"}]},{"defaultStatus":"affected","product":"Linux","programFiles":["fs/ocfs2/namei.c","fs/ocfs2/xattr.c","fs/ocfs2/xattr.h"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","vendor":"Linux","versions":[{"status":"affected","version":"6.4"},{"lessThan":"6.4","status":"unaffected","version":"0","versionType":"semver"},{"lessThanOrEqual":"5.10.*","status":"unaffected","version":"5.10.275","versionType":"semver"},{"lessThanOrEqual":"5.15.*","status":"unaffected","version":"5.15.226","versionType":"semver"},{"lessThanOrEqual":"6.1.*","status":"unaffected","version":"6.1.193","versionType":"semver"},{"lessThanOrEqual":"6.6.*","status":"unaffected","version":"6.6.163","versionType":"semver"},{"lessThanOrEqual":"6.12.*","status":"unaffected","version":"6.12.119","versionType":"semver"},{"lessThanOrEqual":"6.18.*","status":"unaffected","version":"6.18.65","versionType":"semver"},{"lessThanOrEqual":"7.3.*","status":"unaffected","version":"7.3.6","versionType":"semver"},{"lessThanOrEqual":"*","status":"unaffected","version":"7.4-rc1","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"cpeMatch":[{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.10.275","versionStartIncluding":"5.10.181","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"5.15.226","versionStartIncluding":"5.15.114","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.1.193","versionStartIncluding":"6.1.31","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.6.163","versionStartIncluding":"6.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.12.119","versionStartIncluding":"6.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"6.18.65","versionStartIncluding":"6.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.3.6","versionStartIncluding":"6.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionEndExcluding":"7.4-rc1","versionStartIncluding":"6.4","vulnerable":true},{"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"6.3.5","vulnerable":true}],"negate":false,"operator":"OR"}]}],"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: retain all security xattrs during inode creation\n\nWhen creating a new inode, ocfs2_init_security_get() stores the security\nxattr returned by the LSM framework in ocfs2_security_xattr_info so that\nit can be written later within the same transaction.  But\nocfs2_initxattrs() only ever looks at the first element of the xattr\narray, and it keeps the name as a bare pointer into memory owned by the\nsecurity layer instead of copying it.  The value, by contrast, is already\nduplicated with kmemdup().\n\nWith stacked LSMs, security_inode_init_security() provides one xattr per\nLSM, so all labels but the first are silently dropped and never written to\ndisk, leaving newly created files without the security xattrs the other\nLSMs rely on.\n\nThe borrowed name is not an outright bug with the LSMs in tree today:\nsecurity_inode_init_security() frees only ->value once the callback\nreturns, and documents ->name as the attribute name suffix, so the pointer\nstays valid for as long as ocfs2 uses it.  It is fragile though, as an LSM\nthat allocates the name together with the value would turn it into a\nuse-after-free, so the rework below copies the names as well.\n\nFix this by storing copies of all the security xattrs: allocate an array\nin ocfs2_initxattrs(), copy the names and values, account for all of them\nin the credit calculations, and write each one in\nocfs2_init_security_set().\n\nWhile at it, switch the allocations from GFP_KERNEL to GFP_NOFS.  The\ncallback runs in the inode creation path with the parent directory locked,\nand the security layer allocates the very same xattr array with GFP_NOFS,\nso direct reclaim must not be allowed to recurse into the filesystem from\nhere."}],"providerMetadata":{"dateUpdated":"2026-11-30T13:34:19.377Z","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux"},"references":[{"url":"https://git.kernel.org/stable/c/ce055a1378e5b4e8fcaf1c8dc4df82c326bf9306"},{"url":"https://git.kernel.org/stable/c/1b9930ebec9dc92b3cce3231dcb9ed8ebd5da7dd"},{"url":"https://git.kernel.org/stable/c/ae8ee59668124a4a544996727067cc5ae20af6dd"},{"url":"https://git.kernel.org/stable/c/3a6df319db221e1bc4eb0ce22218c904512b1f60"},{"url":"https://git.kernel.org/stable/c/5c815fd8de4a7e935b287ebf980121876f229b76"},{"url":"https://git.kernel.org/stable/c/5bc277c89570e096c574188dcfdd538e3c139bd1"},{"url":"https://git.kernel.org/stable/c/314f6183f13fda459261a4723a453df67e15008b"},{"url":"https://git.kernel.org/stable/c/d637475617d8468c2740a3436428681bcc8d3572"}],"title":"ocfs2: retain all security xattrs during inode creation","x_generator":{"engine":"bippy-1.2.0"}}},"cveMetadata":{"assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","assignerShortName":"Linux","cveId":"CVE-2026-139391","datePublished":"2026-11-30T13:34:19.377Z","dateReserved":"2026-11-30T13:22:15.931Z","dateUpdated":"2026-11-30T13:34:19.377Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.2"},"nvd":{"publishedDate":"2026-11-30 14:19:07","lastModifiedDate":"2026-11-30 14:19:07","problem_types":[],"metrics":[],"configurations":[]},"legacy_mitre":{"record":{"CveYear":"2026","CveId":"139391","Ordinal":"1","Title":"ocfs2: retain all security xattrs during inode creation","CVE":"CVE-2026-139391","Year":"2026"},"notes":[{"CveYear":"2026","CveId":"139391","Ordinal":"1","NoteData":"In the Linux kernel, the following vulnerability has been resolved:\n\nocfs2: retain all security xattrs during inode creation\n\nWhen creating a new inode, ocfs2_init_security_get() stores the security\nxattr returned by the LSM framework in ocfs2_security_xattr_info so that\nit can be written later within the same transaction.  But\nocfs2_initxattrs() only ever looks at the first element of the xattr\narray, and it keeps the name as a bare pointer into memory owned by the\nsecurity layer instead of copying it.  The value, by contrast, is already\nduplicated with kmemdup().\n\nWith stacked LSMs, security_inode_init_security() provides one xattr per\nLSM, so all labels but the first are silently dropped and never written to\ndisk, leaving newly created files without the security xattrs the other\nLSMs rely on.\n\nThe borrowed name is not an outright bug with the LSMs in tree today:\nsecurity_inode_init_security() frees only ->value once the callback\nreturns, and documents ->name as the attribute name suffix, so the pointer\nstays valid for as long as ocfs2 uses it.  It is fragile though, as an LSM\nthat allocates the name together with the value would turn it into a\nuse-after-free, so the rework below copies the names as well.\n\nFix this by storing copies of all the security xattrs: allocate an array\nin ocfs2_initxattrs(), copy the names and values, account for all of them\nin the credit calculations, and write each one in\nocfs2_init_security_set().\n\nWhile at it, switch the allocations from GFP_KERNEL to GFP_NOFS.  The\ncallback runs in the inode creation path with the parent directory locked,\nand the security layer allocates the very same xattr array with GFP_NOFS,\nso direct reclaim must not be allowed to recurse into the filesystem from\nhere.","Type":"Description","Title":"ocfs2: retain all security xattrs during inode creation"}]}}}