KernelScan.io

HIGH Introduced in 3.13

ima XattrVerify OOB

CVE-2026-74671

CVSS 7.3 / 10.0 KernelScan AI

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:L/A:H

01

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.

02

Engine v0.6.0

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.

Affectedsecurity/integrity/ima/ima_appraise.c (IMA appraisal)

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.

03

BranchIntroducedFixed inPatch commit
5.103.135.10.265d823b5f45570
5.153.135.15.216caeb105c15ea
6.13.136.1.183a784b4732ac7
6.123.136.12.1047e515b6c9aab
6.183.136.18.4527f392406159
6.63.136.6.152b6cb134707a2
7.13.137.1.9dd04114af0d4
mainline3.137.25ff232d31106
cip/5.103.135.10.268-cip77d823b5f45570
cip/5.10-rt3.135.10.268-cip77-rt34d823b5f45570
cip/6.13.136.1.187-cip60a784b4732ac7
cip/6.1-rt3.136.1.189-cip61-rt32a784b4732ac7
cip/6.123.136.12.104-cip307e515b6c9aab

04

State of the newest release of each Civil Infrastructure Platform SLTS tree, from CIP's own fix records.

CIP treeState
cip/6.12Fixed in 6.12.104-cip30
cip/6.1Fixed in 6.1.187-cip60
cip/6.1-rtFixed in 6.1.189-cip61-rt32
cip/5.10Fixed in 5.10.268-cip77
cip/5.10-rtFixed in 5.10.268-cip77-rt34
cip/4.19Affected — no CIP fix yet (latest 4.19.325-cip136)
cip/4.19-rtAffected — no CIP fix yet (latest 4.19.325-cip136-rt50)
cip/4.4Affected — no CIP fix yet (latest 4.4.302-cip115)
cip/4.4-rtAffected — no CIP fix yet (latest 4.4.302-cip115-rt63)