
nftables ruleset that mitigates CVE-2026-98432 in the Linux kernel by dropping incoming IPv4 TCP packets containing IP options while allowing normal TCP traffic.
This vulnerability affects the IPv4 connection handling in the Linux Kernel and can lead to remote code execution.
This vulnerability is currently being exploited in the wild.
I created a nftables configuration file that can help block incoming IPv4 TCP packets that contain IP options. IPv4 TCP packets without IP options can still go through the firewall. Servers that depend on TCP connections with IP options will be blocked.
Save the file to your current nftables directory.
Add this line to your main nftables configuration file:
include "/etc/nftables.conf.d/cve-2026-98432.nft"
Check for any errors:
sudo nft -f nftables.conf -c
If no errors appear you can apply the rules:
sudo nft -f nftables.conf
List the ruleset to see if the new rules were applied:
sudo nft list ruleset
Save the new ruleset and keep it after a reboot:
sudo bash -c 'nft list ruleset > /etc/nftables.conf'