{"id":"CVE-2026-143354","summary":"bpf: Require BPF_LWT_REROUTE when an lwt_in prog changes the protocol","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: Require BPF_LWT_REROUTE when an lwt_in prog changes the protocol\n\nWhen an lwt_in prog returns BPF_OK, bpf_input() calls orig_input(), the\ninput handler of the route. This handler is for one IP version and needs a\ndst of the same family. But BPF_LWT_ENCAP_IP lets the prog push a header of\nthe other IP version and thus change skb-\u003eprotocol. Then the handler reads\nand changes a header of the other IP version. The push of an SRH also\nreplaces the dst, because seg6_lookup_nexthop() puts an rt6_info into the\nskb. Then ip_forward() uses the rt6_info as a struct rtable.\n\nDrop the skb with -EINVAL when skb-\u003eprotocol changes, as bpf_xmit() does.\nDrop it also when the family of the dst changes, because skb-\u003eprotocol does\nnot always show this change. Today no such skb leaves as the prog made it.\nA prog works as before if it returns BPF_LWT_REROUTE, or if it pushes an\nSRH on an IPv6 route.\n\nThe commit in the first Fixes tag lets a prog change skb-\u003eprotocol. The\ncommit in the second tag adds the check to bpf_xmit() only.","modified":"2026-12-03T11:02:04.517675055Z","published":"2026-12-03T09:22:10.347Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143354.json"},"references":[{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"},{"type":"WEB","url":"https://git.kernel.org/stable/c/35d3016d6b0528bb65cee90b4b34879bdbeabef2"},{"type":"WEB","url":"https://git.kernel.org/stable/c/3e08bbd4772e503bb7f7fe6f9cab95ad414dee16"},{"type":"WEB","url":"https://git.kernel.org/stable/c/6f18041922b04300d751956eb9ac805aff02514b"},{"type":"WEB","url":"https://git.kernel.org/stable/c/d9618a6196953718f7470de5d2e84121bed063f7"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/143xxx/CVE-2026-143354.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-143354"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"52f278774e796a553be0c869dcaaee6f259ca795"},{"fixed":"35d3016d6b0528bb65cee90b4b34879bdbeabef2"},{"fixed":"6f18041922b04300d751956eb9ac805aff02514b"},{"fixed":"3e08bbd4772e503bb7f7fe6f9cab95ad414dee16"},{"fixed":"d9618a6196953718f7470de5d2e84121bed063f7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143354.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.1.0"},{"fixed":"6.12.120"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.13.0"},{"fixed":"6.18.66"}]},{"type":"ECOSYSTEM","events":[{"introduced":"6.19.0"},{"fixed":"7.3.7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-143354.json"}}],"schema_version":"1.9.2"}