HIGH Introduced in 3.13
ima XattrVerify OOB
CVE-2026-74671
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: ima: fix out-of-bounds read in xattr_verify() The digest-length check in xattr_verify() mixes int and size_t: if (xattr_len - sizeof(xattr_value->type) - hash_start >= iint->ima_hash->length) sizeof() yields size_t, so the usual arithmetic conversions promote the whole left-hand side to unsigned 64-bit before the subtraction runs. For a truncated xattr this underflows instead of going negative: a 1-byte IMA_XATTR_DIGEST_NG xattr (xattr_len == 1, hash_start == 1) turns "1 - 1 - 1" into SIZE_MAX, which is trivially >= ima_hash->length. The check then passes and the following memcmp() reads iint->ima_hash->length bytes starting past the end of the buffer vfs_getxattr_alloc() allocated for it. Nothing upstream clamps xattr_len back into a safe range first: ima_get_hash_algo() only special-cases xattr_len < 2 to pick a default algorithm, and evm_verifyxattr() returns INTEGRITY_UNKNOWN rather than failing when no HMAC key is loaded, so a truncated security.ima value reaches the length check as-is. Rewrite the comparison so every operand stays a signed int and no implicit conversion to size_t can occur.
02KernelScan AI Analysis
Risk summary
A signed/unsigned arithmetic mismatch in IMA's extended-attribute verification allows a truncated integrity label to bypass a length check, causing an out-of-bounds read of heap memory. An attacker who can place a file with a malformed label on a system with IMA appraisal enabled can trigger the read; this may be achieved by mounting a crafted filesystem image, attaching removable media, or serving a malicious file from a compromised network filesystem server.
Vulnerability analysis
The kernel's file-integrity check mistakenly uses unsigned arithmetic when calculating how much extended-attribute data is present. If a file carries a truncated integrity label, the calculation underflows to a huge value instead of failing, so the bounds check is skipped. A later comparison then reads past the end of the attribute buffer into nearby heap memory. The fix switches the arithmetic to signed integers so that a too-short attribute is rejected before any comparison happens. An attacker can reach this by getting a file with a malformed integrity label onto a system that has IMA appraisal turned on, whether through a crafted disk image, removable media, or a hostile network filesystem server; once the file is opened or executed, the faulty check runs automatically.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 5.10 | 3.13 | 5.10.265 | d823b5f45570 |
| 5.15 | 3.13 | 5.15.216 | caeb105c15ea |
| 6.1 | 3.13 | 6.1.183 | a784b4732ac7 |
| 6.12 | 3.13 | 6.12.104 | 7e515b6c9aab |
| 6.18 | 3.13 | 6.18.45 | 27f392406159 |
| 6.6 | 3.13 | 6.6.152 | b6cb134707a2 |
| 7.1 | 3.13 | 7.1.9 | dd04114af0d4 |
| mainline | 3.13 | 7.2 | 5ff232d31106 |
| cip/5.10 | 3.13 | 5.10.268-cip77 | d823b5f45570 |
| cip/5.10-rt | 3.13 | 5.10.268-cip77-rt34 | d823b5f45570 |
| cip/6.1 | 3.13 | 6.1.187-cip60 | a784b4732ac7 |
| cip/6.1-rt | 3.13 | 6.1.189-cip61-rt32 | a784b4732ac7 |
| cip/6.12 | 3.13 | 6.12.104-cip30 | 7e515b6c9aab |
04CIP Kernels
State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.
| CIP tree | State |
|---|---|
| cip/6.12 | Fixed in 6.12.104-cip30 |
| cip/6.1 | Fixed in 6.1.187-cip60 |
| cip/6.1-rt | Fixed in 6.1.189-cip61-rt32 |
| cip/5.10 | Fixed in 5.10.268-cip77 |
| cip/5.10-rt | Fixed in 5.10.268-cip77-rt34 |
| cip/4.19 | Affected — no CIP fix yet (latest 4.19.325-cip136) |
| cip/4.19-rt | Affected — no CIP fix yet (latest 4.19.325-cip136-rt50) |
| cip/4.4 | Affected — no CIP fix yet (latest 4.4.302-cip115) |
| cip/4.4-rt | Affected — no CIP fix yet (latest 4.4.302-cip115-rt63) |