CVE-2025-38502 json
bpf: Fix oob access in cgroup local storage
published 2025-08-16 14 mo ago modified 2026-10-15 24 d ago also EUVD-2025-25076
- cvss
- 7.8
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.2%
- EPSS 0.2% chance of exploitation in 30 days, percentile 8%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- Linux Linux 5.15.192, 6.1.151, 6.6.105, 6.12.46, 6.16.1, 6.17
- Siemens SIMATIC CN 4100 V5.0
- linux Debian 12 6.1.153-1
- linux Debian 13 6.12.48-1
- linux Debian 14 6.16.3-1
debian advisories DEBIAN-CVE-2025-38502
- linux Ubuntu 22.04 LTS 5.15.0-163.173
- linux Ubuntu 24.04 LTS 6.8.0-106.106
- linux-aws Ubuntu 22.04 LTS 5.15.0-1097.104
- linux-aws Ubuntu 24.04 LTS 6.8.0-1050.53
- linux-gcp Ubuntu 22.04 LTS 5.15.0-1097.106
- linux-gcp Ubuntu 24.04 LTS 6.8.0-1052.55
- linux-gke Ubuntu 22.04 LTS 5.15.0-1093.99
- linux-gke Ubuntu 24.04 LTS 6.8.0-1048.53
ubuntu advisories UBUNTU-CVE-2025-38502
Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0
- kernel Azure Linux 3.0 6.6.112.1-1
- kernel CBL-Mariner 2.0 5.15.200.1-1
azure linux advisories AZL-66359AZL-73473
Azure Linux vulnerability data, Copyright (c) Microsoft Corporation, from https://github.com/microsoft/AzureLinuxVulnerabilityData via OSV, under the MIT licence; changed: normalised to fixed package versions per release. MIT
- git.kernel.org/stable/c/c1c74584b9b4043c52e41fec415226e582d266a3 commit
- git.kernel.org/stable/c/66da7cee78590259b400e51a70622ccd41da7bb2 commit
- git.kernel.org/stable/c/7acfa07c585e3d7a64654d38f0a5c762877d0b9b commit
- git.kernel.org/stable/c/41688d1fc5d163a6c2c0e95c0419e2cb31a44648 commit
- git.kernel.org/stable/c/19341d5c59e8c7e8528e40f8663e99d67810473c commit
- git.kernel.org/stable/c/abad3d0bad72a52137e0c350c59542d75ae4f513 commit
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-38502 updated cvss 4.0
kernel: bpf: Fix oob access in cgroup local storage
-
Red Hat Enterprise Linux 8 perf, kernel, bpftool, kernel-rt, kernel-core, kernel-tools, +29 more Red Hat Enterprise Linux 9 rv, perf, rtla, kernel, bpftool, libperf, +83 more Red Hat Enterprise Linux 10 kernelaffected: workaround, no fix available “Fix deferred”
-
Red Hat Enterprise Linux 6 perf, kernel, python-perf, kernel-kdump, kernel-firmware, kernel-bootwrapper, +1 more Red Hat Enterprise Linux 7 perf, kernel, bpftool, kernel-rt, python-perf, kernel-kdump, +8 morenot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
cisa ICSA-26-134-10 updated cvss 4.0
Siemens SIMATIC
-
Siemens SIMATIC CN 4100 < 5.0affected: fixed in V5.0 support.industry.siemens.com
Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf
CISA SSVC
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
- Assessed
- 24 d ago
Exploit prediction
0.19% chance of exploitation in the next 30 days, higher than 8% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 7.8 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | 3.1 | 7.1 | CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H |
Affected products
- Linux Linux
- Siemens SIMATIC CN 4100
Classification
- Weakness
-
- CWE-125 Out-of-bounds Read
- Technology feeds
References
-
git.kernel.org
/stable/c/c1c74584b9b4043c52e41fec415226e582d266a3
patch
-
git.kernel.org
/stable/c/66da7cee78590259b400e51a70622ccd41da7bb2
patch
-
git.kernel.org
/stable/c/7acfa07c585e3d7a64654d38f0a5c762877d0b9b
patch
-
git.kernel.org
/stable/c/41688d1fc5d163a6c2c0e95c0419e2cb31a44648
patch
-
git.kernel.org
/stable/c/19341d5c59e8c7e8528e40f8663e99d67810473c
patch
-
git.kernel.org
/stable/c/abad3d0bad72a52137e0c350c59542d75ae4f513
patch
-
lists.debian.org
/debian-lts-announce/2025/10/msg00008.html
mailing-list, third-party-advisory
-
cert-portal.siemens.com
/productcert/html/ssa-032379.html
third-party-advisory
Sources
- CVE List CVE-2025-38502
- NVD CVE-2025-38502
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.