{"id":"CVE-2025-40078","summary":"bpf: Explicitly check accesses to bpf_sock_addr","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Explicitly check accesses to bpf_sock_addr\n\nSyzkaller found a kernel warning on the following sock_addr program:\n\n    0: r0 = 0\n    1: r2 = *(u32 *)(r1 +60)\n    2: exit\n\nwhich triggers:\n\n    verifier bug: error during ctx access conversion (0)\n\nThis is happening because offset 60 in bpf_sock_addr corresponds to an\nimplicit padding of 4 bytes, right after msg_src_ip4. Access to this\npadding isn't rejected in sock_addr_is_valid_access and it thus later\nfails to convert the access.\n\nThis patch fixes it by explicitly checking the various fields of\nbpf_sock_addr in sock_addr_is_valid_access.\n\nI checked the other ctx structures and is_valid_access functions and\ndidn't find any other similar cases. Other cases of (properly handled)\npadding are covered in new tests in a subsequent patch.","modified":"2026-04-16T04:38:29.161027119Z","published":"2025-10-28T11:48:43.548Z","related":["SUSE-SU-2025:21040-1","SUSE-SU-2025:21052-1","SUSE-SU-2025:21056-1","SUSE-SU-2025:21064-1","SUSE-SU-2025:21080-1","SUSE-SU-2025:21147-1","SUSE-SU-2025:21180-1","SUSE-SU-2025:4057-1","SUSE-SU-2025:4128-1","SUSE-SU-2025:4132-1","SUSE-SU-2025:4140-1","SUSE-SU-2025:4141-1","SUSE-SU-2025:4189-1","SUSE-SU-2025:4301-1","openSUSE-SU-2025:15702-1","openSUSE-SU-2025:20091-1","openSUSE-SU-2026:10301-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40078.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/4f00858cd9bbbdf67159e28b85a8ca9e77c83622"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6d8b1a21fd5c34622b0c3893c61e4a38d8ba53ec"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6fabca2fc94d33cdf7ec102058983b086293395f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/76e04bbb4296fb6eac084dbfc27e02ccc744db3e"},{"type":"WEB","url":"https://git.kernel.org/stable/c/ad8b4fe5617e3c85fc23267f02500c4f3bf0ff69"},{"type":"WEB","url":"https://git.kernel.org/stable/c/cdeafacb4f9ff261a96baef519e29480fd7b1019"},{"type":"WEB","url":"https://git.kernel.org/stable/c/de44cdc50d2dce8718cb57deddf9cf1be9a7759f"},{"type":"WEB","url":"https://git.kernel.org/stable/c/fe9d33f0470350558cb08cecb54cf2267b3a45d2"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40078.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40078"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"1cedee13d25ab118d325f95588c1a084e9317229"},{"fixed":"de44cdc50d2dce8718cb57deddf9cf1be9a7759f"},{"fixed":"76e04bbb4296fb6eac084dbfc27e02ccc744db3e"},{"fixed":"6d8b1a21fd5c34622b0c3893c61e4a38d8ba53ec"},{"fixed":"4f00858cd9bbbdf67159e28b85a8ca9e77c83622"},{"fixed":"cdeafacb4f9ff261a96baef519e29480fd7b1019"},{"fixed":"fe9d33f0470350558cb08cecb54cf2267b3a45d2"},{"fixed":"ad8b4fe5617e3c85fc23267f02500c4f3bf0ff69"},{"fixed":"6fabca2fc94d33cdf7ec102058983b086293395f"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40078.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"4.18.0"},{"fixed":"5.4.301"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.5.0"},{"fixed":"5.10.246"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.195"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"6.1.156"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.2.0"},{"fixed":"6.6.112"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.7.0"},{"fixed":"6.12.53"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.17.3"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40078.json"}}],"schema_version":"1.7.5"}