cve.bz

CVE-2025-38502 Out-of-bounds Read

7.1 highEPSS 0.2%Fix available

High (7.1). EPSS 0.2% estimated probability of exploitation activity in the next 30 days.

On this page
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix oob access in cgroup local storage Lonial reported that an out-of-bounds access in cgroup local storage can be crafted via tail calls. Given two programs each utilizing a cgroup local storage with a different value size, and one program doing a tail call into the other. The verifier will validate each of the indivial programs just fine. However, in the runtime context the bpf_cg_run_ctx holds an bpf_prog_array_item which contains the BPF program as well as any cgroup local storage flavor the program uses. Helpers such as bpf_get_local_storage() pick this up from the runtime context: ctx = container_of(current->bpf_ctx, struct bpf_cg_run_ctx, run_ctx); storage = ctx->prog_item->cgroup_storage[stype]; if (stype == BPF_CGROUP_STORAGE_SHARED) ptr = &READ_ONCE(storage->buf)->data[0]; else ptr = this_cpu_ptr(storage->percpu_buf); For the second program which was called from the originally attached one, this means bpf_get_local_storage() will pick up the former program's map, not its own. With mismatching sizes, this can result in an unintended out-of-bounds access. To fix this issue, we need to extend bpf_map_owner with an array of storage_cookie[] to match on i) the exact maps from the original program if the second program was using bpf_get_local_storage(), or ii) allow the tail call combination if the second program was not using any of the cgroup local storage maps.

Severity

CVSS 3.1

7.1 high
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H
EPSS
0.2% (unchanged from 0.2% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 8th percentile. Scored 2026-11-15. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-10-15. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-125 Out-of-bounds Read
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2025-38502 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2025-38502?via=ask-ai-copy and https://cve.bz/cve/CVE-2025-38502?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2025-38502 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Badge for a README or a site

CVE-2025-38502

An image that stays current: it is drawn from the data each time it is fetched (a host that proxies images, as GitHub does, may show its copy for a while). Markdown:

[![CVE-2025-38502](https://cve.bz/cve/badge/CVE-2025-38502.svg)](https://cve.bz/cve/CVE-2025-38502)

HTML:

<a href="https://cve.bz/cve/CVE-2025-38502"><img src="https://cve.bz/cve/badge/CVE-2025-38502.svg" alt="CVE-2025-38502"></a>

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Linux5.9 and later

Fixed in

ProductRelease lineFixed in
Linux5.155.15.192
Linux6.16.1.151
Linux6.66.6.105
Linux6.126.12.46
Linux6.166.16.1
Linuxlater releases6.17

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian11linux-6.16.1.153-1~deb11u1DLA-4328-1
Debian12linux6.1.153-1DEBIAN-CVE-2025-38502 DSA-6009-1
Debian13linux6.12.48-1DEBIAN-CVE-2025-38502 DSA-6008-1
Debian14linux6.16.3-1DEBIAN-CVE-2025-38502
Ubuntu16.04:LTSlinux-hwe-edgeno fix listedUBUNTU-CVE-2025-38502
Ubuntu18.04:LTSlinux-gcp, linux-hwe, linux-oem and 12 moreno fix listedUBUNTU-CVE-2025-38502
Ubuntu20.04:LTSlinux-gke, linux-gkeop, linux-riscv and 26 moreno fix listedUBUNTU-CVE-2025-38502
Ubuntu22.04:LTSlinux, linux-lowlatency5.15.0-163.173UBUNTU-CVE-2025-38502 USN-7909-1
Ubuntu22.04:LTSlinux-aws5.15.0-1097.104UBUNTU-CVE-2025-38502 USN-7909-1
Ubuntu22.04:LTSlinux-aws-6.86.8.0-1050.53~22.04.1UBUNTU-CVE-2025-38502 USN-8095-4
Ubuntu22.04:LTSlinux-azure5.15.0-1101.110UBUNTU-CVE-2025-38502 USN-7910-2
Ubuntu22.04:LTSlinux-azure-6.86.8.0-1051.57~22.04.1UBUNTU-CVE-2025-38502 USN-8126-1
Ubuntu22.04:LTSlinux-azure-fde5.15.0-1102.111.1UBUNTU-CVE-2025-38502
Ubuntu22.04:LTSlinux-azure-fde-6.86.8.0-1058.65~22.04.1UBUNTU-CVE-2025-38502
Ubuntu22.04:LTSlinux-gcp5.15.0-1097.106UBUNTU-CVE-2025-38502 USN-7909-4
Ubuntu22.04:LTSlinux-gcp-6.86.8.0-1052.55~22.04.1UBUNTU-CVE-2025-38502 USN-8095-1
60 more for Ubuntu in the JSON and on Ubuntu's page.
Azure Linux2kernel5.15.200.1-1AZL-73473
Azure Linux3kernel6.6.112.1-1AZL-66359
Alpaquita23linux-lts6.1.151-r0BELL-CVE-2025-38502
Alpaquita25linux-lts6.12.51-r0BELL-CVE-2025-38502
Alpaquitastreamlinux-lts6.18.35-r1BELL-CVE-2025-38502

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Alpaquita.

Red Hat

Red Hat rates this Low.

Red Hat's statement

A low-impact out-of-bounds access flaw was found in the Linux kernel's BPF cgroup local storage handling, affecting the kernel and kernel-rt packages in Red Hat Enterprise Linux 8, 9, and 10 and the kernel in Red Hat In-Vehicle OS. When a cgroup-attached BPF program performs a tail call into another program that uses a cgroup local storage map with a different value size, the bpf_get_local_storage() helper retrieves the originally attached program's storage from the runtime context instead of the tail-called program's own map. Because the BPF verifier validates each program independently, this size mismatch is not detected, and the tail-called program can perform an unintended out-of-bounds access on kernel memory. A local attacker able to load and attach crafted BPF programs could use this flaw to trigger an out-of-bounds kernel memory access, resulting in a system crash or other unintended consequences.

Red Hat Enterprise Linux 6 and 7 are not affected because the vulnerable code (shared cgroup local storage between programs on the same cgroup, introduced upstream in Linux 5.9) is not present in those releases. Fixes for the affected Red Hat Enterprise Linux and Red Hat In-Vehicle OS streams are currently deferred because the flaw is rated low impact and requires a local attacker who already has the ability to load and run BPF programs; the residual risk is limited to such an attacker triggering an out-of-bounds kernel memory access. Red Hat assessed this flaw as low severity, lower than the NIST (7.1) and CVE.org (7.8) ratings, because exploitation requires local access with the ability to load crafted BPF programs and the assessed direct impact is limited (RH CVSS 4.0, availability-only impact).

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10kernelFix deferred
Red Hat Enterprise Linux 6kernelNot affected
Red Hat Enterprise Linux 7kernelNot affected
Red Hat Enterprise Linux 7kernel-rtNot affected
Red Hat Enterprise Linux 8kernelFix deferred
Red Hat Enterprise Linux 8kernel-rtFix deferred
Red Hat Enterprise Linux 9kernelFix deferred
Red Hat Enterprise Linux 9kernel-rtFix deferred

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2025-38502.

ICS advisories (CISA)

AdvisoryTitlePublishedSectorsAffectedFixed
ICSA-26-134-10Siemens SIMATIC2026-05-12Critical ManufacturingSIMATIC CN 4100none listed

From CISA's ICS advisories (CSAF), provided under CISA's notification. Only the facts are shown; each advisory is on CISA's page. Credits.

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it.

  • abraxas/CVE-2025-38502-Linux-LPE Harbor Check: matches CVE 2 stars, C, created
    CVE-2025-38502 Linux LPE. BPF cgroup local storage OOB via tail calls. Affected kernels: 5.9–5.15.191, 5.16–6.1.150, 6.2–6.6.104, 6.7–6.12.…

Attack patterns (CAPEC)

  • CAPEC-540 Overread Buffers Likelihood: Low · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON