
Temporary eBPF/XDP mitigation for CVE-2026-98432 Linux TCP IPv4 header-options vulnerability. Helps protect unpatched systems and custom kernels until an official kernel fix can be deployed.
Status: Temporary mitigation — not a permanent fix
Platform tested: Linux / Ubuntu 20.04 (should work upwards)
Kernel tested: 5.15.0-124-generic (Expected to work on newer Linux kernels providing the required eBPF and generic XDP functionality. Compatibility must be verified on the target kernel.)
Implementation: eBPF XDP, generic (SKB) mode
Date: 2026-11-03
This project provides a temporary network-level mitigation for the IPv4/TCP attack surface associated with CVE-2026-98432.
The objective is to reduce exposure while a corrected kernel is being prepared, installed and deployed.
The mitigation rejects inbound IPv4 TCP packets containing IPv4 header options. It does this at the XDP ingress hook, before the packet reaches the normal IPv4 and TCP networking stack.
This is deliberately a narrow, fail-open mitigation:
This is not a kernel fix. It is a temporary measure intended to buy time until a corrected kernel has been compiled, installed and boot-tested.
The vulnerable attack surface is associated with handling IPv4 TCP traffic and IPv4 header options.
IPv4 header options are an uncommon feature in ordinary modern network traffic. They include mechanisms such as:
The IPv4 header contains a header-length field, IHL, expressed in 32-bit words.
A normal IPv4 header without options has:
IHL = 5 (20 bytes)
An IPv4 header containing options has:
IHL > 5 (more than 20 bytes)
The XDP program uses this distinction to reject IPv4 TCP packets with an extended IPv4 header.
This avoids passing that particular packet class into the kernel's normal TCP processing path.
The program is attached to network interfaces using XDP generic mode.
Its processing sequence is:
IHL > 5, drop the packet.Simplified decision logic:
if (ether_type == IPv4) {
if (ipv4_header_is_incomplete)
PASS;
if (ipv4_version != 4)
PASS;
if (ipv4_header_length_is_invalid)
PASS;
if (ipv4_protocol == TCP && ipv4_ihl > 5)
DROP;
}
PASS;
The actual implementation also handles up to two VLAN tags.
| Condition | Action |
|---|---|
| IPv4 TCP, IHL greater than 5 | DROP |
| IPv4 TCP, IHL equal to 5 | PASS |
| IPv4 UDP | PASS |
| Other IPv4 protocols | PASS |
| IPv6 | PASS |
| Non-IP Ethernet traffic | PASS |
| Incomplete/truncated IPv4 header | PASS |
The implementation does not parse TCP options. TCP timestamps, SACK and window scaling are not IPv4 header options and remain unaffected.
This mitigation uses XDP (eXpress Data Path) rather than Netfilter/iptables because the objective is to discard matching packets as early as reasonably possible in the Linux networking receive path.
With generic XDP (SKB mode), the filter runs at the ingress stage before the packet enters the normal network protocol stack and before Netfilter's usual IPv4 processing hooks.
This has several advantages for this particular mitigation:
iptables and nftables are perfectly valid ways to implement this same filtering rule. In fact, Netfilter-based filtering is a legitimate alternative and may be preferable where an administrator already manages ingress filtering centrally through the firewall.
However, those mechanisms operate later in the receive path than XDP generic mode.
For this specific use case, filtering before normal IPv4/TCP processing is desirable because the vulnerability concerns the handling of IPv4 TCP packets carrying IPv4 header options.
This project deliberately uses generic XDP rather than driver-specific native XDP.
Generic XDP operates on the SKB-based receive path and therefore provides broader compatibility with network drivers that do not implement native XDP support.
The trade-off is that generic XDP does not provide the same early execution point or performance characteristics as native driver-mode XDP. It should not be confused with hardware-offloaded XDP.
The choice of XDP is not based on the assumption that Netfilter is insecure or unsuitable.
It is based on placing this particular packet filter as early as practical in the Linux receive path, while retaining broad compatibility through generic XDP.
The objective is to reject the relevant packet class before it reaches the vulnerable IPv4/TCP processing path, not to replace the host firewall.
The filter blocks all IPv4 TCP packets carrying IPv4 header options, not just Record Route.
This includes packets containing, for example:
The filter does not distinguish between individual IPv4 option types. It rejects the entire IPv4 TCP packet whenever the IPv4 header length exceeds 20 bytes.
This is intentional: a broad and simple rule is preferable to an incomplete option-type blacklist for this temporary mitigation.
This mitigation has deliberately limited scope.
It does not:
It also does not perform general IP packet validation. Incomplete or malformed packets outside the specific checks implemented by the program may still be passed to the kernel.
Do not interpret a successful XDP deployment as proof that the host is no longer vulnerable.
The program uses a per-CPU array map:
cve_2026_98432_stats
Map properties:
percpu_arrayCounters:
| Key | Meaning |
|---|---|
| 0 | IPv4 TCP packets with IPv4 options dropped |
| 1 | Incomplete/truncated IPv4 headers passed |