bpf: Reset skb->cb after an lwt prog pushes an IP header
Summary
| CVE | CVE-2026-143355 |
|---|---|
| State | PUBLISHED |
| Assigner | Linux |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-12-03 10:18:24 UTC |
| Updated | 2026-12-03 10:18:24 UTC |
| Description | In the Linux kernel, the following vulnerability has been resolved: bpf: Reset skb->cb after an lwt prog pushes an IP header IPCB(skb)->opt holds the offsets from the network header to the IPv4 options. But bpf_lwt_push_ip_encap() moves the network header and does not change IPCB(skb). Then ip_forward_options() and __ip_options_echo() use the old offsets on the pushed header. Thus the kernel corrupts the skb and the stack. If the family changes, the kernel also reads IP6CB(skb) as IPCB(skb), or the reverse. With CONFIG_IPV6_MIP6, it reads IPSKB_FORWARDED as frag_max_size and adds a needless fragment header. Reset skb->cb after the prog. bpf_lwt_push_ip_encap() cannot do it, because bpf_prog_run_save_cb() can restore skb->cb. For IPv4 in IPv4, clear IPCB(skb)->opt as ip_tunnel_xmit() does. If the family changes, clear the cb of the new family but keep iif, because ip6_forward() gets the input device from it. Behind a VRF, skb->skb_iif is the VRF device and cannot replace iif. Do nothing for IPv6 in IPv6, as in seg6_do_srh_encap(). Do the reset in bpf_input() only after a push. Without a push, ip_forward_options() needs the offsets. Do it in bpf_xmit() before each reroute, because an lwt_xmit prog can also change the options. Thus after a reroute without a push, ip_options_fragment() leaves the options in all fragments, and ICMP errors echo none. After BPF_OK or BPF_REDIRECT the skb goes to a device, thus bpf_xmit() does no reset. The inner IPv4 checksum can still be wrong after ip_rcv_options() changes an option. |
Risk And Classification
EPSS: 0.002090000 probability, percentile 0.116460000 (date 2026-12-03)
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | Linux | Linux | affected 52f278774e796a553be0c869dcaaee6f259ca795 f8faab33bf6fada08fea4941d8781a7205345c99 git | Not specified |
| CNA | Linux | Linux | affected 52f278774e796a553be0c869dcaaee6f259ca795 5f8aed23c1b0c839d5f428844b25aafab09b667e git | Not specified |
| CNA | Linux | Linux | affected 52f278774e796a553be0c869dcaaee6f259ca795 f1d695ec88d088ce107a3a0b588631e3c02c4184 git | Not specified |
| CNA | Linux | Linux | affected 52f278774e796a553be0c869dcaaee6f259ca795 b3ad42f6183286ab376389a5d26edf7ee3bdba27 git | Not specified |
| CNA | Linux | Linux | affected 5.1 | Not specified |
| CNA | Linux | Linux | unaffected 5.1 semver | Not specified |
| CNA | Linux | Linux | unaffected 6.12.120 6.12.* semver | Not specified |
| CNA | Linux | Linux | unaffected 6.18.66 6.18.* semver | Not specified |
| CNA | Linux | Linux | unaffected 7.3.7 7.3.* semver | Not specified |
| CNA | Linux | Linux | unaffected 7.4-rc2 * original_commit_for_fix | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| git.kernel.org/stable/c/f1d695ec88d088ce107a3a0b588631e3c02c4184 | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | git.kernel.org | |
| git.kernel.org/stable/c/f8faab33bf6fada08fea4941d8781a7205345c99 | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | git.kernel.org | |
| git.kernel.org/stable/c/5f8aed23c1b0c839d5f428844b25aafab09b667e | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | git.kernel.org | |
| git.kernel.org/stable/c/b3ad42f6183286ab376389a5d26edf7ee3bdba27 | 416baaa9-dc9f-4396-8d5f-8c081fb06d67 | git.kernel.org | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.