CVE-2026-143149: seg6: validate state in netfilter continuations
In the Linux kernel, the following vulnerability has been resolved:
seg6: validate state in netfilter continuations
When nfhookslwtunnel is enabled, End.DX4 sends decapsulated packets through NFINETPREROUTING. If DNAT changes the inner destination, nfnatipv4prerouting() drops skbdst(), and the continuation then dereferences the missing dst's lwtstate. This causes a KASAN NULL pointer dereference and fatal exception panic.
End.DX6 has the same issue with IPv6 DNAT. In seg6iptunnel, POSTROUTING SNAT with an outbound XFRM policy can replace the dst before the continuation resumes.
Validate the current dst and expected lwtstate type in each NFHOOK() continuation before calling the existing handler. Drop packets with missing or incompatible state while preserving direct no-hook paths. The helpers return bool because callers only need a validity check.
Testing shows that the End.DX4 DNAT reproducer triggers a KASAN NULL pointer dereference without this change and no longer does so with the fix. The SNAT+ESP/XFRM reproducer also completes without the reported fault. The in-tree End.DX4 netfilter forwarding selftest passes all four bidirectional checks with nfhookslwtunnel disabled and enabled.
Affected Software
Event History
Frequently Asked Questions
Are direct no-hook packet paths affected?
The fix preserves direct no-hook paths. The failure is associated with netfilter hook continuations that resume after the packet destination state has been removed or replaced.
What validation evidence is available for the fix?
The End.DX4 DNAT reproducer no longer triggers the KASAN NULL pointer dereference, and the SNAT plus ESP/XFRM reproducer completes without the reported fault. The in-tree End.DX4 netfilter forwarding selftest also passes all four bidirectional checks with nf_hooks_lwtunnel enabled.