CRITICAL Introduced in 4.4
perf MachineResolve OOB
CVE-2026-80670
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
KernelScan AI5.5MEDIUM
01Description
In the Linux kernel, the following vulnerability has been resolved: perf tools: Use perf_env__get_cpu_topology() in machine__resolve() machine__resolve() accesses env->cpu[al->cpu].socket_id after checking al->cpu >= 0 and env->cpu != NULL, but without validating al->cpu against env->nr_cpus_avail. Since al->cpu comes from the untrusted perf.data sample, a crafted file with a large CPU index causes an out-of-bounds heap read. Use perf_env__get_cpu_topology() which validates both NULL and bounds. Also bounds-check al->cpu before the cast to struct perf_cpu (int16_t): without this, values like 65536 silently truncate to 0, bypassing the accessor's internal check and returning CPU 0's topology.
02KernelScan AI Analysis
Risk summary
A crafted perf.data file with a large CPU index triggers an out-of-bounds heap read in the perf tool when resolving samples. An attacker who can get a victim to analyze a malicious perf.data file can leak heap memory contents. The issue is local and is reachable with ordinary user privileges.
Vulnerability analysis
When the perf tool resolves samples from a perf.data file, it reads CPU topology information using a CPU index taken directly from the file without checking it against the number of CPUs actually recorded. A crafted file with an out-of-range CPU index causes the tool to read past the end of the topology array on the heap, leaking memory. Additionally, large values could silently truncate when cast to a narrower integer type, causing incorrect topology lookups. The fix validates the CPU index against the available count before any access and uses a bounds-checking accessor, preventing both the over-read and the truncation bypass. The vulnerable path is reached whenever the perf tool processes a perf.data file, so an attacker who can supply or trick a user into analyzing such a file can trigger the read.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.18 | 4.4 | 6.18.40 | b9e8406651dc |
| 7.1 | 4.4 | 7.1.5 | eb266a14c16a |
| mainline | 4.4 | 7.2 | 5484b43a0ec8 |
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 | Affected — no CIP fix yet (latest 6.12.112-cip33) |
| cip/6.1 | Affected — no CIP fix yet (latest 6.1.189-cip61) |
| cip/6.1-rt | Affected — no CIP fix yet (latest 6.1.189-cip61-rt32) |
| cip/5.10 | Affected — no CIP fix yet (latest 5.10.271-cip78) |
| cip/5.10-rt | Affected — no CIP fix yet (latest 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) |