Skip to content
CVE PROGRAM SOURCE RECORDUnscored

CVE-2026-143359

bpf: Reject non-IPv6 packets in BPF_LWT_ENCAP_SEG6

Description

In the Linux kernel, the following vulnerability has been resolved: bpf: Reject non-IPv6 packets in BPF_LWT_ENCAP_SEG6 The mode BPF_LWT_ENCAP_SEG6 of bpf_lwt_push_encap() pushes an IPv6 header and an SRH, and it replaces the dst. The SRH says that IPv6 follows, and skb->protocol does not change. Thus the mode assumes an IPv6 packet, but an lwt_in prog also runs for IPv4 packets. After the prog, bpf_input() calls orig_input() of the old dst. This IPv4 handler reads the pushed headers as IPv4. It can write after the packet data, and the kernel crashes. after the push orig_input() expects --------------------- -------------------- skb->protocol ETH_P_IP ETH_P_IP dst rt6_info rtable packet | IPv6 | SRH | IPv4 | | IPv4 | The mode BPF_LWT_ENCAP_SEG6_INLINE returns -EBADMSG for non-IPv6 packets. Apply this check to both modes. End.BPF does not change, because seg6_local_input() drops non-IPv6 packets.

Affected products

Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.

Linux Linux

Default version status: unaffected

  • fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 to < 4a612ff71a094f2d77a4b07787ef45cfc2eb04a3affected
  • fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 to < 32f8d033044693f77f98da40ab206e38108cde6faffected
  • fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 to < ad3d6fe9772e06b50082d91e5906aa21ed2cb4acaffected
  • fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 to < d29c91e8c031bc9b5a78dc199235893c040877dbaffected
  • fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 to < d7106132b69e6916762bbbfd95fbcb60be4b8d9baffected
  • fe94cc290f535709d3c5ebd1e472dfd0aec7ee79 to < 58e39f8d58b141b96c030008a20dde9d625ec997affected

Linux Linux

Default version status: affected

  • 4.18affected
  • 0 to < 4.18unaffected
  • 5.10.276 to ≤ 5.10.*unaffected
  • 5.15.227 to ≤ 5.15.*unaffected
  • 6.12.120 to ≤ 6.12.*unaffected
  • 6.18.66 to ≤ 6.18.*unaffected
  • 7.3.7 to ≤ 7.3.*unaffected
  • 7.4-rc2 to ≤ *unaffected

References