CVE-2026-139080
published high CVSS 3.1 · 7.1ocfs2: reject inconsistent local xattr entries
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Linux | — | Linux199799a3609f6d5bb231a75c2e702afaac805431 to < 1d1bcc50465e24d999bfecc539753d0820ddfcc2 · 199799a3609f6d5bb231a75c2e702afaac805431 to < 415ad9147484a9994ad7963c46aaf56e14dd3b49 · Other versions: unaffected | Affected | Not stated | Linux |
| Linux | — | Linux2.6.34 (affected) · 0 to < 2.6.34 (unaffected · semver) · 7.3.6 through 7.3.* (unaffected · semver) · 7.4-rc1 and later (unaffected · original_commit_for_fix) · Other versions: affected | Version-specific | Not stated | Linux |
| Amazon Linux | AL2 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
| Amazon Linux | AL2023 | Release evaluation | Not Affected | Not required | Amazon Linux assessment |
Description
In the Linux kernel, the following vulnerability has been resolved: ocfs2: reject inconsistent local xattr entries [BUG] A corrupt OCFS2 xattr entry can set OCFS2_XATTR_ENTRY_LOCAL while keeping xe_value_size larger than OCFS2_XATTR_INLINE_SIZE. When that entry reaches namevalue_size_xe(), the filesystem hits its BUG_ON: kernel BUG at fs/ocfs2/xattr.c:231! Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI RIP: 0010:namevalue_size_xe fs/ocfs2/xattr.c:231 [inline] RIP: 0010:ocfs2_xa_block_wipe_namevalue+0x2e4/0x330 fs/ocfs2/xattr.c:1638 Call Trace: ocfs2_xa_wipe_namevalue fs/ocfs2/xattr.c:1470 [inline] ocfs2_xa_remove_entry+0xae/0x1d0 fs/ocfs2/xattr.c:1941 ocfs2_xa_remove fs/ocfs2/xattr.c:2043 [inline] ocfs2_xa_set+0x11a8/0x30a0 fs/ocfs2/xattr.c:2247 ocfs2_xattr_ibody_set+0x302/0xc50 fs/ocfs2/xattr.c:2795 __ocfs2_xattr_set_handle+0x7e6/0xdb0 fs/ocfs2/xattr.c:3416 ocfs2_xattr_set+0x1447/0x2610 fs/ocfs2/xattr.c:3650 ocfs2_xattr_security_set+0x37/0x50 fs/ocfs2/xattr.c:7241 __vfs_removexattr+0x14d/0x1d0 fs/xattr.c:518 cap_inode_killpriv+0x29/0x50 security/commoncap.c:355 security_inode_killpriv+0x105/0x220 security/security.c:2724 setattr_prepare+0x147/0x8a0 fs/attr.c:219 ocfs2_setattr+0x504/0x1fd0 fs/ocfs2/file.c:1148 notify_change+0x4b5/0x1030 fs/attr.c:546 do_truncate+0x1d2/0x230 fs/open.c:68 handle_truncate fs/namei.c:3596 [inline] do_open fs/namei.c:3979 [inline] path_openat+0x260f/0x2ce0 fs/namei.c:4134 do_filp_open+0x1f6/0x430 fs/namei.c:4161 do_sys_openat2+0x117/0x1c0 fs/open.c:1437 ... [CAUSE] namevalue_size_xe() assumes that local entries contain an inline value no larger than OCFS2_XATTR_INLINE_SIZE. Existing xattr metadata validation only checks whether the value fits the storage region, and cached entries can reach lookup and bucket maintenance paths without a semantic check. A corrupt entry can therefore be passed to namevalue_size_xe(). [FIX] Validate the local/value-size invariant in the existing flat and bucket metadata validators and before accepting matched entries or traversing bucket entries in paths that call namevalue_size_xe(). Return an OCFS2 corruption error instead of firing the assertion.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.1 / 10
- Severity
- high
- Provider
- Linux · cna
- Vector string
- CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:H
- Scenarios
- en: AV:L - The bad data is an on-disk ocfs2_xattr_entry with OCFS2_XATTR_ENTRY_LOCAL set and xe_value_size > 80, in a dinode inline region or a flat xattr block. It is read from a mounted image, and no network protocol carries it. ocfs2_fs_type has only FS_REQUIRES_DEV, so it cannot be mounted from a user namespace. AC:L - Pre-fix ocfs2_validate_xattr_entries_flat() checks each value only against the region end, with no overlap check and no 80-byte check. On a crafted image, removexattr of the entry triggers the BUG; removexattr of a valid neighbour followed by getxattr deterministically produces the over-read. Both steps are ordinary syscalls with no race. PR:N - ocfs2_xa_add_namevalue() never marks a value over 80 bytes local, so this entry requires a crafted image. Once a victim mounts it, writing to or truncating a file carrying security.capability goes through cap_inode_killpriv() to removexattr, and getxattr/removexattr on mode-0666 files need no privilege. UI:R - The malformed entry does nothing until a victim mounts the crafted OCFS2 image through ocfs2_fill_super(). The xattr operations on that volume are what then reach ocfs2_xa_block_wipe_namevalue() and ocfs2_xattr_ibody_get(). S:U - The BUG_ON and the over-read both occur in the host kernel's own ocfs2 buffer_heads. No VM, IOMMU or guest-to-host boundary is crossed. C:H - Removing a valid neighbour makes ocfs2_xa_block_wipe_namevalue() add that neighbour's size to the bad entry's xe_name_offset, so its declared value now ends past the block. The cached bh is not revalidated, and ocfs2_xattr_find_entry() checks only the name, so getxattr copies up to about one block of the next, unrelated order-0 page to userspace. I:N - Every write to an entry's storage first sizes that entry with namevalue_size_xe(): the wipe memmove/memset, reuse_entry, the bucket defrag and divide loops, and check_space. For the bad entry that call BUGs, and the neighbour wipe moves bytes by the neighbour's own valid size, so nothing is written out of bounds. A:H - Removing or replacing the bad entry hits the BUG at xattr.c:231 inside ocfs2_xa_set(), with a jbd2 handle, ip_xattr_sem and the inode cluster lock held. The killed task leaves the transaction open, which hangs the volume, or panics the node under panic_on_oops. It can be repeated on every mount.
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| Linux | Linux | 199799a3609f6d5bb231a75c2e702afaac805431 to < 1d1bcc50465e24d999bfecc539753d0820ddfcc2 (affected · git)199799a3609f6d5bb231a75c2e702afaac805431 to < 415ad9147484a9994ad7963c46aaf56e14dd3b49 (affected · git)Default: unaffected | Linux · cna |
| Linux | Linux | 2.6.34 (affected)0 to < 2.6.34 (unaffected · semver)7.3.6 through 7.3.* (unaffected · semver)7.4-rc1 and later (unaffected · original_commit_for_fix)Default: affected | Linux · cna |
Weaknesses
0No weakness assertions.
References
2Provider assertions
1Linux · cna
ocfs2: reject inconsistent local xattr entries
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- c03c146225f0f32efafeb640f750dcf875f2b124e214720c9e33ed15b24c5b7d
- Ingested
- 02 Dec 2026, 09:26:23 UTC
- Source record
- Official CVE record