{"id":"CVE-2026-143353","state":"PUBLISHED","title":"bpf: Don't let lwt_in progs call into IPv6 when it is disabled","description":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't let lwt_in progs call into IPv6 when it is disabled\n\nWith ipv6.disable=1, inet6_init() returns before it registers any pernet\nsubsystem. Thus net->ipv6.devconf_all and net->ipv6.seg6_data stay NULL.\nIS_ENABLED(CONFIG_IPV6) only says that the code is built in.\nbpf_lwt_input_reroute() and bpf_push_seg6_encap() call into IPv6, but do\nnot test ipv6_mod_enabled(). An lwt_in prog also runs with ipv6.disable=1,\nand skb->protocol == htons(ETH_P_IPV6) does not prove that IPv6 is enabled.\nThus the kernel dereferences NULL and crashes.\n\nReturn -EAFNOSUPPORT before these calls if ipv6_mod_enabled() is false.\nBPF_LWT_REROUTE then drops an IPv6 skb. With IPv6 enabled nothing changes.\n\nThe first Fixes tag is for bpf_push_seg6_encap(), which never had this\ntest. The second tag is for bpf_lwt_input_reroute(). Until that commit it\nused ipv6_stub, which returned -EAFNOSUPPORT with ipv6.disable=1.","publishedAt":"2026-12-03T09:22:09.654Z","updatedAt":"2026-12-03T09:22:09.654Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fe94cc290f535709d3c5ebd1e472dfd0aec7ee79","status":"affected","lessThan":"ef5073375e48ae95b00788e7b32edfb92204f66a","versionType":"git"},{"version":"fe94cc290f535709d3c5ebd1e472dfd0aec7ee79","status":"affected","lessThan":"95f1d5e4abb79fe85a54f7a46b41f297ce533c31","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c","net/core/lwt_bpf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.18","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c","net/core/lwt_bpf.c"]}],"references":["https://git.kernel.org/stable/c/ef5073375e48ae95b00788e7b32edfb92204f66a","https://git.kernel.org/stable/c/95f1d5e4abb79fe85a54f7a46b41f297ce533c31"],"weaknesses":[],"ingestedAt":"2026-12-03T09:44:04.436Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/143xxx/CVE-2026-143353.json","commit":"9e309c7c0f08856e2558a1df33f75dca027fab70","baselineCommit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-143353","state":"PUBLISHED","datePublished":"2026-12-03T09:22:09.654Z","dateUpdated":"2026-12-03T09:22:09.654Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2026-12-03T03:10:28.368Z"},"containers":{"cna":{"title":"bpf: Don't let lwt_in progs call into IPv6 when it is disabled","descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Don't let lwt_in progs call into IPv6 when it is disabled\n\nWith ipv6.disable=1, inet6_init() returns before it registers any pernet\nsubsystem. Thus net->ipv6.devconf_all and net->ipv6.seg6_data stay NULL.\nIS_ENABLED(CONFIG_IPV6) only says that the code is built in.\nbpf_lwt_input_reroute() and bpf_push_seg6_encap() call into IPv6, but do\nnot test ipv6_mod_enabled(). An lwt_in prog also runs with ipv6.disable=1,\nand skb->protocol == htons(ETH_P_IPV6) does not prove that IPv6 is enabled.\nThus the kernel dereferences NULL and crashes.\n\nReturn -EAFNOSUPPORT before these calls if ipv6_mod_enabled() is false.\nBPF_LWT_REROUTE then drops an IPv6 skb. With IPv6 enabled nothing changes.\n\nThe first Fixes tag is for bpf_push_seg6_encap(), which never had this\ntest. The second tag is for bpf_lwt_input_reroute(). Until that commit it\nused ipv6_stub, which returned -EAFNOSUPPORT with ipv6.disable=1."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"fe94cc290f535709d3c5ebd1e472dfd0aec7ee79","status":"affected","lessThan":"ef5073375e48ae95b00788e7b32edfb92204f66a","versionType":"git"},{"version":"fe94cc290f535709d3c5ebd1e472dfd0aec7ee79","status":"affected","lessThan":"95f1d5e4abb79fe85a54f7a46b41f297ce533c31","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c","net/core/lwt_bpf.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"4.18","status":"affected"},{"version":"0","status":"unaffected","lessThan":"4.18","versionType":"semver"},{"version":"7.3.7","status":"unaffected","lessThanOrEqual":"7.3.*","versionType":"semver"},{"version":"7.4-rc2","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["net/core/filter.c","net/core/lwt_bpf.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/ef5073375e48ae95b00788e7b32edfb92204f66a"},{"url":"https://git.kernel.org/stable/c/95f1d5e4abb79fe85a54f7a46b41f297ce533c31"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-12-03T09:22:09.654Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"7.3.7"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"4.18","versionEndExcluding":"7.4-rc2"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}