{"id":"CVE-2025-40078","aliases":["CVE-2025-40078"],"related":[],"kind":"vulnerability","state":"published","title":"bpf: Explicitly check accesses to bpf_sock_addr","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta:\n\nbpf: Comprobar explícitamente los accesos a bpf_sock_addr\n\nSyzkaller encontró una advertencia del kernel en el siguiente programa sock_addr:\n\n    0: r0 = 0\n    1: r2 = *(u32 *)(r1 +60)\n    2: exit\n\nlo que activa:\n\n    error del verificador: error durante la conversión de acceso a ctx (0)\n\nEsto está ocurriendo porque el desplazamiento 60 en bpf_sock_addr corresponde a un relleno implícito de 4 bytes, justo después de msg_src_ip4. El acceso a este relleno no es rechazado en sock_addr_is_valid_access y, por lo tanto, más tarde falla en convertir el acceso.\n\nEste parche lo soluciona comprobando explícitamente los diversos campos de bpf_sock_addr en sock_addr_is_valid_access.\n\nRevisé las otras estructuras ctx y las funciones is_valid_access y no encontré ningún otro caso similar. Otros casos de relleno (manejado correctamente) están cubiertos en nuevas pruebas en un parche posterior.","source":"nvd"}],"published":"2025-10-28T11:48:43.548Z","modified":"2026-11-10T13:17:54.293Z","severities":[],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"de44cdc50d2dce8718cb57deddf9cf1be9a7759f","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"76e04bbb4296fb6eac084dbfc27e02ccc744db3e","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"6d8b1a21fd5c34622b0c3893c61e4a38d8ba53ec","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"4f00858cd9bbbdf67159e28b85a8ca9e77c83622","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"cdeafacb4f9ff261a96baef519e29480fd7b1019","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"fe9d33f0470350558cb08cecb54cf2267b3a45d2","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"ad8b4fe5617e3c85fc23267f02500c4f3bf0ff69","status":"affected"},{"type":"git","introduced":"1cedee13d25ab118d325f95588c1a084e9317229","fixed":"6fabca2fc94d33cdf7ec102058983b086293395f","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.18","status":"unaffected"},{"type":"semver","introduced":"5.4.301","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.246","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.195","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.156","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.6.112","lastAffected":"6.6.*","status":"unaffected"},{"type":"semver","introduced":"6.12.53","lastAffected":"6.12.*","status":"unaffected"},{"type":"semver","introduced":"6.17.3","lastAffected":"6.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/de44cdc50d2dce8718cb57deddf9cf1be9a7759f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/76e04bbb4296fb6eac084dbfc27e02ccc744db3e","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6d8b1a21fd5c34622b0c3893c61e4a38d8ba53ec","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4f00858cd9bbbdf67159e28b85a8ca9e77c83622","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/cdeafacb4f9ff261a96baef519e29480fd7b1019","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/fe9d33f0470350558cb08cecb54cf2267b3a45d2","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ad8b4fe5617e3c85fc23267f02500c4f3bf0ff69","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/6fabca2fc94d33cdf7ec102058983b086293395f","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-019113.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-457936.html","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-40078","url":"https://www.cve.org/CVERecord?id=CVE-2025-40078","licence":"CVE Terms of Use","modified":"2026-11-10T12:37:33.365Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-40078","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-40078","licence":"Public domain","modified":"2026-11-10T13:17:54.293Z"}],"updatedAt":"2026-11-25T22:59:06.947Z","epss":{"score":0.00254,"percentile":0.18091,"date":"2026-12-01T12:00:22.000Z"}}