Vulnerability · Published Aug 16, 2025 · Assigned by Linux
CVE-2025-38502bpf: Fix oob access in cgroup local storage
High 7.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 8% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.153-1 | DEBIAN-CVE-2025-38502 |
| Debian:12 | linux | 6.1.153-1 | DSA-6009-1 |
| Debian:13 | linux | 6.12.48-1 | DEBIAN-CVE-2025-38502 |
| Debian:13 | linux | 6.12.48-1 | DSA-6008-1 |
| Debian:14 | linux | 6.16.3-1 | DEBIAN-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux | 5.15.0-163.173 | USN-7909-1 |
| Ubuntu:22.04:LTS | linux | 5.15.0-163.173 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux | 6.8.0-106.106 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux | 6.8.0-106.106 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1097.104 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1097.104 | USN-7909-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1050.53 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1050.53 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1050.53~22.04.1 | USN-8095-4 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1050.53~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1101.110 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1101.110 | USN-7910-2 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1051.57 | USN-8125-1 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1051.57 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1051.57~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1102.111.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1058.65 | UBUNTU-CVE-2025-38502 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1058.65~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1097.106 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1097.106 | USN-7909-4 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1052.55 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1052.55 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1052.55~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1052.55~22.04.1 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1093.99 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1093.99 | USN-7909-4 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1048.53 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1048.53 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1080.88 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1080.88 | USN-7909-4 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1035.38 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1035.38 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-106.106~22.04.1 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-106.106~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1091.94 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1091.94 | USN-7909-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1049.49 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1049.49 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1049.49~22.04.1 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1049.49~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1092.98 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1092.98 | USN-7909-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1089.94 | USN-7933-1 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1089.94 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-163.173 | USN-7909-1 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-163.173 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-106.106.1 | USN-8095-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-106.106.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-106.106.1~22.04.1 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-106.106.1~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1092.93 | USN-7909-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1092.93 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1049.52 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1049.52 | USN-8100-1 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1049.52~22.04.1 | USN-8100-1 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1049.52~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1049.52.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1049.52.1 | USN-8100-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1049.49 | USN-7909-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1049.49 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1020.20 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1038.38 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1038.38 | USN-7909-1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1094.100 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1094.100 | USN-7909-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1047.48 | USN-8095-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1047.48 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1047.48~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1047.48~22.04.1 | USN-8095-1 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1091.94 | USN-7909-5 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1091.94 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1050.54 | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1050.54 | USN-8095-5 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-106.106~22.04.1 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-38502 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1029.30 | USN-8261-1 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1028.29 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1061.65 | UBUNTU-CVE-2025-38502 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1061.65 | USN-7909-1 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 7d9c3427894fe70d1347b4820476bf37736d2ff0 – before c1c74584b9b4043c52e41fec415226e582d266a37d9c3427894fe70d1347b4820476bf37736d2ff0 – before 66da7cee78590259b400e51a70622ccd41da7bb27d9c3427894fe70d1347b4820476bf37736d2ff0 – before 7acfa07c585e3d7a64654d38f0a5c762877d0b9b7d9c3427894fe70d1347b4820476bf37736d2ff0 – before 41688d1fc5d163a6c2c0e95c0419e2cb31a446487d9c3427894fe70d1347b4820476bf37736d2ff0 – before 19341d5c59e8c7e8528e40f8663e99d67810473c7d9c3427894fe70d1347b4820476bf37736d2ff0 – before abad3d0bad72a52137e0c350c59542d75ae4f513 |
| Linux | Linux | 5.9 |
References
- https://git.kernel.org/stable/c/c1c74584b9b4043c52e41fec415226e582d266a3
- https://git.kernel.org/stable/c/66da7cee78590259b400e51a70622ccd41da7bb2
- https://git.kernel.org/stable/c/7acfa07c585e3d7a64654d38f0a5c762877d0b9b
- https://git.kernel.org/stable/c/41688d1fc5d163a6c2c0e95c0419e2cb31a44648
- https://git.kernel.org/stable/c/19341d5c59e8c7e8528e40f8663e99d67810473c
- https://git.kernel.org/stable/c/abad3d0bad72a52137e0c350c59542d75ae4f513
- https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html
- https://cert-portal.siemens.com/productcert/html/ssa-032379.html