CVE-2025-38591
Vulnerability Summary
Timeline
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.
CVSS Metrics
- v3.1•MEDIUM•Score: 5.5CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Trends
Current EPSS score: 0.20%• Percentile: 10%
Affected Systems
- chainguard•linux-aws-6.12
< 6.12.76-r0 | < 6.12.69-r0 | < 6.12.67-r0 | < 6.12.60-r4 | < 6.12.68-r1 | < 6.12.74-r1 | < 6.12.78-r0 | < 6.12.74-r0 | < 6.12.72-r1 | < 6.12.68-r0 | < 6.12.62-r2 | < 6.12.71-r0 | < 6.12.62-r1 | < 6.12.77-r2 | < 6.12.80-r0 | < 6.12.72-r0 | < 6.12.70-r0 | < 6.12.65-r0 | < 6.12.63-r0 | < 6.12.62-r0 | < 6.12.65-r1 | < 6.12.77-r1 | < 6.12.77-r0 | < 6.12.66-r0 | < 6.12.65-r2
- chainguard•linux-azure-6.12
< 6.12.62-r0 | < 6.12.74-r1 | < 6.12.65-r4 | < 6.12.72-r0 | < 6.12.77-r0 | < 6.12.78-r0 | < 6.12.63-r0 | < 6.12.65-r1 | < 6.12.68-r0 | < 6.12.76-r0 | < 6.12.65-r3 | < 6.12.77-r1 | < 6.12.66-r0 | < 6.12.60-r4 | < 6.12.62-r2 | < 6.12.62-r1 | < 6.12.65-r2 | < 6.12.60-r3 | < 6.12.67-r0 | < 6.12.69-r0 | < 6.12.80-r0 | < 6.12.71-r0 | < 6.12.77-r2 | < 6.12.74-r0 | < 6.12.70-r0
- chainguard•linux-gcp-6.12
< 6.12.72-r0 | < 6.12.60-r3 | < 6.12.77-r2 | < 6.12.65-r0 | < 6.12.76-r0 | < 6.12.62-r0 | < 6.12.78-r0 | < 6.12.63-r0 | < 6.12.68-r0 | < 6.12.69-r0 | < 6.12.62-r2 | < 6.12.74-r1 | < 6.12.60-r4 | < 6.12.80-r0 | < 6.12.68-r1 | < 6.12.65-r2 | < 6.12.77-r0 | < 6.12.71-r0 | < 6.12.65-r1 | < 6.12.62-r1 | < 6.12.74-r0 | < 6.12.77-r1 | < 6.12.66-r0 | < 6.12.70-r0 | < 6.12.67-r0
- chainguard•linux-qemu-6.12
< 6.12.70-r0 | < 6.12.68-r0 | < 6.12.65-r2 | < 6.12.78-r0 | < 6.12.74-r0 | < 6.12.71-r0 | < 6.12.67-r0 | < 6.12.77-r2 | < 6.12.69-r0 | < 6.12.80-r0 | < 6.12.76-r0 | < 6.12.66-r0 | < 6.12.77-r0 | < 6.12.72-r0 | < 6.12.77-r1 | < 6.12.65-r1 | < 6.12.74-r1
- chainguard•linux-vmware-6.12
< 6.12.66-r0 | < 6.12.74-r1 | < 6.12.71-r0 | < 6.12.76-r0 | < 6.12.70-r0 | < 6.12.67-r0 | < 6.12.65-r1 | < 6.12.72-r0 | < 6.12.74-r0 | < 6.12.65-r2 | < 6.12.77-r1 | < 6.12.77-r0 | < 6.12.68-r1 | < 6.12.69-r0 | < 6.12.80-r0 | < 6.12.68-r0 | < 6.12.77-r2 | < 6.12.78-r0
- debian•linux
< 5.10.249-1 | < 6.1.162-1 | < 6.12.69-1 | < 6.16.3-1
- debian•linux-6.1
< 6.1.162-1~deb11u1
- ubuntu•linux
all | < 5.15.0-176.186 | < 6.8.0-117.117
- ubuntu•linux-allwinner-5.19
all
- ubuntu•linux-aws
all | < 5.15.0-1105.112 | < 6.8.0-1055.58
- ubuntu•linux-aws-5.0
all
- ubuntu•linux-aws-5.11
all
- ubuntu•linux-aws-5.13
all
- ubuntu•linux-aws-5.15
< 5.15.0-1105.112~20.04.1
- ubuntu•linux-aws-5.19
all
- ubuntu•linux-aws-5.3
all
- ubuntu•linux-aws-5.4
all
- ubuntu•linux-aws-5.8
all
- ubuntu•linux-aws-6.14
all
- ubuntu•linux-aws-6.2
all
- ubuntu•linux-aws-6.5
all
- ubuntu•linux-aws-6.8
< 6.8.0-1057.60~22.04.1
- ubuntu•linux-aws-fips
all | < 5.15.0-1105.112+fips1 | < 6.8.0-1055.58+fips1
- ubuntu•linux-aws-hwe
all
- ubuntu•linux-azure
all | all | < 5.15.0-1110.119 | < 6.8.0-1056.62
- ubuntu•linux-azure-4.15
all
- ubuntu•linux-azure-5.11
all
- ubuntu•linux-azure-5.13
all
- ubuntu•linux-azure-5.15
< 5.15.0-1110.119~20.04.1
- ubuntu•linux-azure-5.19
all
- ubuntu•linux-azure-5.3
all
- ubuntu•linux-azure-5.4
all
- ubuntu•linux-azure-5.8
all
- ubuntu•linux-azure-6.11
all
- ubuntu•linux-azure-6.14
all
- ubuntu•linux-azure-6.2
all
- ubuntu•linux-azure-6.5
all
- ubuntu•linux-azure-6.8
< 6.8.0-1059.65~22.04.1
- ubuntu•linux-azure-edge
all
- ubuntu•linux-azure-fde
all | all | all | all
- ubuntu•linux-azure-fde-5.19
all
- ubuntu•linux-azure-fde-6.14
all
- ubuntu•linux-azure-fde-6.2
all
- ubuntu•linux-azure-fde-6.8
all
- ubuntu•linux-azure-fips
all | < 5.15.0-1110.119+fips1 | < 6.8.0-1059.65+fips1
- ubuntu•linux-azure-nvidia
all
- ubuntu•linux-azure-nvidia-6.14
all
- ubuntu•linux-bluefield
all | all | < 5.15.0-1089.91 | < 6.8.0-1022.26
- ubuntu•linux-fips
all | < 5.15.0-176.186+fips1 | < 6.8.0-116.116+fips1
- ubuntu•linux-gcp
all | all | < 5.15.0-1105.114 | < 6.8.0-1058.61
Showing first 50 affected entries in server-rendered view.
References (34)
- https://git.kernel.org/stable/c/058a0da4f6d916a79b693384111bb80a90d73763
- https://git.kernel.org/stable/c/202900ceeef67458c964c2af6e1427c8e533ea7c
- https://git.kernel.org/stable/c/e09299225d5ba3916c91ef70565f7d2187e4cca0
- https://git.kernel.org/stable/c/7847c4140e06f6e87229faae22cc38525334c156
- https://git.kernel.org/stable/c/feae34c992eb7191862fb1594c704fbbf650fef8
- https://git.kernel.org/stable/c/33660d44e789edb4f303210c813fc56d56377a90
- https://cert-portal.siemens.com/productcert/html/ssa-019113.html
- https://ubuntu.com/security/CVE-2025-38591
- https://www.cve.org/CVERecord?id=CVE-2025-38591
- https://git.kernel.org/linus/e09299225d5ba3916c91ef70565f7d2187e4cca0
- https://ubuntu.com/security/notices/USN-8162-1
- https://ubuntu.com/security/notices/USN-8180-1
- https://ubuntu.com/security/notices/USN-8180-2
- https://ubuntu.com/security/notices/USN-8186-1
- https://ubuntu.com/security/notices/USN-8187-1
- https://ubuntu.com/security/notices/USN-8188-1
- https://ubuntu.com/security/notices/USN-8180-3
- https://ubuntu.com/security/notices/USN-8180-4
- https://ubuntu.com/security/notices/USN-8180-5
- https://ubuntu.com/security/notices/USN-8243-1
- https://ubuntu.com/security/notices/USN-8180-6
- https://ubuntu.com/security/notices/USN-8275-1
- https://ubuntu.com/security/notices/USN-8278-1
- https://ubuntu.com/security/notices/USN-8289-1
- https://ubuntu.com/security/notices/USN-8296-1
- https://ubuntu.com/security/notices/USN-8297-1
- https://ubuntu.com/security/notices/USN-8296-2
- https://ubuntu.com/security/notices/USN-8289-2
- https://ubuntu.com/security/notices/USN-8278-2
- https://ubuntu.com/security/notices/USN-8393-1
- https://ubuntu.com/security/notices/USN-8440-1
- https://ubuntu.com/security/notices/USN-8499-1
- https://security-tracker.debian.org/tracker/CVE-2025-38591
- https://git.kernel.org/stable/c/e2e9599f3503df7cf3569d2b6c50d5488fb59435