CVE-2025-40078
In the Linux kernel, the following vulnerability has been resolved: bpf: Explicitly check accesses to bpf_sock_addr Syzkaller found a kernel warning on the following sock_addr program: 0: r0 = 0 1: r2 = *(u32 *)(r1 +60) 2: exit which triggers: verifier bug: error during ctx access conversion (0) This is happening because offset 60 in bpf_sock_addr corresponds to an implicit padding of 4 bytes, right after msg_src_ip4. Access to this padding isn't rejected in sock_addr_is_valid_access and it thus later fails to convert the access. This patch fixes it by explicitly checking the various fields of bpf_sock_addr in sock_addr_is_valid_access. I checked the other ctx structures and is_valid_access functions and didn't find any other similar cases. Other cases of (properly handled) padding are covered in new tests in a subsequent patch.
Affected versions
Linux kernel versions
4.18
and later are affected. Fixed in
5.4.301,
5.10.246,
5.15.195,
6.1.156,
6.6.112,
6.12.53,
6.17.3,
6.18
and their respective stable series.
References
The following references provide additional information about CVE-2025-40078 including vendor advisories, patch commits, exploit details, and third-party analysis. Links are sourced from the NIST NVD database.
-
PatchKernel patch commithttps://git.kernel.org/stable/c/4f00858cd9bbbdf67159e28b85a8ca9e77c83622
-
PatchKernel patch commithttps://git.kernel.org/stable/c/6d8b1a21fd5c34622b0c3893c61e4a38d8ba53ec
-
PatchKernel patch commithttps://git.kernel.org/stable/c/6fabca2fc94d33cdf7ec102058983b086293395f
Frequently asked questions
-
What is CVE-2025-40078?
CVE-2025-40078 is a unscored severity Linux kernel vulnerability . It affects Linux kernel versions from 4.18 onward and has been patched in 5.4.301, 5.10.246, 5.15.195 and others. CVE-2025-40078 has not been confirmed as actively exploited and is not listed in the CISA KEV catalog.
-
Is there a patch available for CVE-2025-40078?
Yes — CVE-2025-40078 has been patched. Fixed versions include 5.4.301, 5.10.246, 5.15.195 and others. If you are running Linux kernel 4.18 or later up to the fix versions, apply the relevant patch for your kernel branch.
-
Is CVE-2025-40078 actively exploited?
No — CVE-2025-40078 has not been confirmed as actively exploited. It is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog.