Vulnerability · Published Aug 19, 2025 · Assigned by Linux
CVE-2025-38591bpf: Reject narrower access to pointer ctx fields
Medium 5.5
In plain English
A medium-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 11% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Reject narrower access to pointer ctx fields The following BPF program, simplified from a syzkaller repro, causes a kernel warning: r0 = *(u8 *)(r1 + 169); exit; With pointer field sk being at offset 168 in __sk_buff. This access is detected as a narrower read in bpf_skb_is_valid_access because it doesn't match offsetof(struct __sk_buff, sk). It is therefore allowed and later proceeds to bpf_convert_ctx_access. Note that for the "is_narrower_load" case in the convert_ctx_accesses(), the insn->off is aligned, so the cnt may not be 0 because it matches the offsetof(struct __sk_buff, sk) in the bpf_convert_ctx_access. However, the target_size stays 0 and the verifier errors with a kernel warning: verifier bug: error during ctx access conversion(1) This patch fixes that to return a proper "invalid bpf_context access off=X size=Y" error on the load instruction. The same issue affects multiple other fields in context structures that allow narrow access. Some other non-affected fields (for sk_msg, sk_lookup, and sockopt) were also changed to use bpf_ctx_range_ptr for consistency. Note this syzkaller crash was reported in the "Closes" link below, which used to be about a different bug, fixed in commit fce7bd8e385a ("bpf/verifier: Handle BPF_LOAD_ACQ instructions in insn_def_regno()"). Because syzbot somehow confused the two bugs, the new crash and repro didn't get reported to the mailing list.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.162-1 | DEBIAN-CVE-2025-38591 |
| Debian:12 | linux | 6.1.162-1 | DSA-6127-1 |
| Debian:13 | linux | 6.12.69-1 | DEBIAN-CVE-2025-38591 |
| Debian:13 | linux | 6.12.69-1 | DSA-6126-1 |
| Debian:14 | linux | 6.16.3-1 | DEBIAN-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux | 5.15.0-176.186 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux | 5.15.0-176.186 | USN-8180-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-117.117 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux | 6.8.0-117.117 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1105.112 | USN-8180-1 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1105.112 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1055.58 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-aws | 6.8.0-1055.58 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-aws-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-aws-6.8 | 6.8.0-1057.60~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1110.119 | USN-8180-3 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1110.119 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1056.62 | USN-8278-2 |
| Ubuntu:24.04:LTS | linux-azure | 6.8.0-1056.62 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure-6.11 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1059.65~22.04.1 | USN-8440-1 |
| Ubuntu:22.04:LTS | linux-azure-6.8 | 6.8.0-1059.65~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1114.123 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure-fde | 6.8.0-1058.65 | UBUNTU-CVE-2025-38591 |
| Ubuntu:25.10 | linux-azure-fde | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure-fde-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.8 | 6.8.0-1058.65~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure-nvidia | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-azure-nvidia-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1105.114 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1105.114 | USN-8180-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1058.61 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-gcp | 6.8.0-1058.61 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-gcp-6.11 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-gcp-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gcp-6.8 | 6.8.0-1060.63~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1101.107 | USN-8180-1 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1101.107 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1054.60 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-gke | 6.8.0-1054.60 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1088.96 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1088.96 | USN-8180-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1041.44 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-gkeop | 6.8.0-1041.44 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-hwe-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-hwe-6.8 | 6.8.0-124.124~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1099.102 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1099.102 | USN-8180-5 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1055.56 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-ibm | 6.8.0-1055.56 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1055.56~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-ibm-6.8 | 6.8.0-1055.56~22.04.1 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-intel | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1100.106 | USN-8180-3 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1100.106 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1097.102 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1097.102 | USN-8180-3 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-175.185 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-175.185 | USN-8180-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-117.117.1 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-lowlatency | 6.8.0-117.117.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-lowlatency-hwe-6.11 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-117.117.1~22.04.1 | USN-8278-1 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.8 | 6.8.0-117.117.1~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1100.101 | USN-8180-1 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1100.101 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1054.57 | USN-8289-1 |
| Ubuntu:24.04:LTS | linux-nvidia | 6.8.0-1054.57 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-nvidia-6.11 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1054.57~22.04.1 | USN-8289-2 |
| Ubuntu:22.04:LTS | linux-nvidia-6.8 | 6.8.0-1054.57~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1054.57.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-nvidia-lowlatency | 6.8.0-1054.57.1 | USN-8289-1 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1057.57 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra | 5.15.0-1057.57 | USN-8187-1 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1024.24 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-nvidia-tegra | 6.8.0-1024.24 | USN-8296-2 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1046.46 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-nvidia-tegra-igx | 5.15.0-1046.46 | USN-8187-1 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-oem-6.11 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-oem-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-oem-6.8 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1102.108 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1102.108 | USN-8180-1 |
| Ubuntu:24.04:LTS | linux-oracle | 6.8.0-1054.55 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-oracle-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-oracle-6.8 | 6.8.0-1054.55~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1099.102 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1099.102 | USN-8180-6 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1056.60 | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-raspi | 6.8.0-1056.60 | USN-8278-1 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-riscv-6.14 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-riscv-6.8 | 6.8.0-117.117~22.04.1 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2025-38591 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1032.33 | USN-8499-1 |
| Ubuntu:24.04:LTS | linux-xilinx | 6.8.0-1032.33 | UBUNTU-CVE-2025-38591 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1070.74 | USN-8275-1 |
| Ubuntu:22.04:LTS | linux-xilinx-zynqmp | 5.15.0-1070.74 | UBUNTU-CVE-2025-38591 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | f96da09473b52c09125cc9bf7d7d4576ae8229e0 – before 7847c4140e06f6e87229faae22cc38525334c156f96da09473b52c09125cc9bf7d7d4576ae8229e0 – before feae34c992eb7191862fb1594c704fbbf650fef8f96da09473b52c09125cc9bf7d7d4576ae8229e0 – before 33660d44e789edb4f303210c813fc56d56377a90f96da09473b52c09125cc9bf7d7d4576ae8229e0 – before e2e9599f3503df7cf3569d2b6c50d5488fb59435f96da09473b52c09125cc9bf7d7d4576ae8229e0 – before 058a0da4f6d916a79b693384111bb80a90d73763f96da09473b52c09125cc9bf7d7d4576ae8229e0 – before 202900ceeef67458c964c2af6e1427c8e533ea7cf96da09473b52c09125cc9bf7d7d4576ae8229e0 – before e09299225d5ba3916c91ef70565f7d2187e4cca0 |
| Linux | Linux | 4.13 |
References
- https://git.kernel.org/stable/c/7847c4140e06f6e87229faae22cc38525334c156
- https://git.kernel.org/stable/c/feae34c992eb7191862fb1594c704fbbf650fef8
- https://git.kernel.org/stable/c/33660d44e789edb4f303210c813fc56d56377a90
- https://git.kernel.org/stable/c/e2e9599f3503df7cf3569d2b6c50d5488fb59435
- https://git.kernel.org/stable/c/058a0da4f6d916a79b693384111bb80a90d73763
- https://git.kernel.org/stable/c/202900ceeef67458c964c2af6e1427c8e533ea7c
- https://git.kernel.org/stable/c/e09299225d5ba3916c91ef70565f7d2187e4cca0
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html
- https://cert-portal.siemens.com/productcert/html/ssa-457936.html