CVE-2025-38502
Linux Kernel vulnerability analysis and mitigation

Overview

In the Linux kernel, a vulnerability (CVE-2025-38502) has been identified involving an out-of-bounds access in cgroup local storage that can be crafted via tail calls. The issue was discovered by Lonial and affects multiple Linux distributions including bullseye, bookworm, trixie, forky, and sid, where it remains in a vulnerable state (Debian Tracker).

Technical details

The vulnerability occurs when two programs each utilize a cgroup local storage with different value sizes, and one program performs a tail call into the other. While the verifier validates each individual program correctly, the runtime context bpfcgrunctx holds a bpfprogarrayitem containing the BPF program and its cgroup local storage flavor. The bpfgetlocal_storage() helper picks up the former program's map instead of its own from the runtime context, leading to an unintended out-of-bounds access when sizes mismatch (NVD).

Impact

When exploited, this vulnerability can result in out-of-bounds memory access, potentially leading to memory corruption and system instability. The issue affects the Linux kernel's cgroup functionality, which is critical for resource management and isolation (NVD).

Mitigation and workarounds

To address this vulnerability, the bpfmapowner needs to be extended with an array of storagecookie[] to match either the exact maps from the original program if the second program uses bpfgetlocalstorage(), or allow the tail call combination if the second program does not use any cgroup local storage maps (NVD).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management