Read-only patch-state and exposure check for CVE-2026-98432 (Linux kernel IPv4 TCP use-after-free, CVSS 9.8), with opt-in interim mitigation and exact rollback.
Patch-state and exposure check for CVE-2026-98432 (Linux kernel, IPv4 TCP, CVSS 9.8),
with opt-in interim mitigation and exact rollback. The default mode is read-only.
The script never triggers the vulnerability. It changes system state only with --mitigate or --rollback and records changes so it can be undone.
--mitigate and --rollback need root, plus nft (preferred) or iptables with the
xt_u32 module for the firewall rule.ss for listener counts, netlabelctl for the CIPSO guard, bpftool for XDP
detection, systemctl for persistence.--kernel-version flag lets you exercise the version logic on any OS, including macOS../cve-2026-98432.sh # human-readable check
./cve-2026-98432.sh --json # one JSON object, for diffing before/after
./cve-2026-98432.sh --kernel-version 6.12.112 # evaluate a version string instead of uname -r
sudo ./cve-2026-98432.sh --mitigate --dry-run
sudo ./cve-2026-98432.sh --mitigate [--disable-mptcp] [--persist] [--ignore-netlabel]
sudo ./cve-2026-98432.sh --rollback [--dry-run]
./cve-2026-98432.sh --help
| Flag | Effect |
|---|---|
--json | Machine-readable output. Warnings still go to stderr. |
--kernel-version V | Run the version logic against V. Skips all host probes. |
--mitigate | Apply interim mitigations (see below). Refuses if a previous run is still recorded. |
--disable-mptcp | With --mitigate: also set net.mptcp.enabled=0. Breaks apps that need MPTCP. |
--persist | With --mitigate: make the changes survive reboot and firewall reloads. |
--ignore-netlabel | With --mitigate: install the drop rule even when CIPSO labelled networking is configured. |
--rollback | Undo a previous --mitigate exactly, then re-run the check. |
--dry-run | Print the commands and file contents that would be used; change nothing. |
--mitigate and --rollback are mutually exclusive. After either one the check runs again
and prints the new state.
| Code | Meaning |
|---|---|
| 0 | PATCHED or NOT_AFFECTED |
| 1 | VULNERABLE or LIKELY_VULNERABLE |
| 2 | Usage error, missing root, Linux-only mode on another OS, or re-apply without rollback |
| 3 | UNKNOWN patch state |
| 4 | --mitigate or --rollback did not complete. The errors are on stderr and the report still shows the patch state. |
Codes 0, 1 and 3 reflect patch state, never mitigation state. A mitigated but unpatched host still exits 1, because the mitigation is not a fix. Code 4 takes precedence, so automation can tell that a requested change failed even on a patched host.
Checks run in this order and the first match wins:
PATCHED. Debian/Ubuntu: the installed
linux-image-$(uname -r) changelog. RPM systems: rpm -q --changelog on kernel-core,
kernel, kernel-default or kernel-uek. This is the only reliable signal for vendor
kernels, which backport fixes without changing the upstream version..el9, -generic, .amzn, -pve, and similar). Fixed stable releases:
5.10.272, 5.15.223, 6.1.190, 6.6.159, 6.12.113, 6.18.56, 7.2.10, 7.3.
At or above → PATCHED; below → VULNERABLE. A 7.3 release candidate is UNKNOWN
because the fix landed at rc7.NOT_AFFECTED.VULNERABLE; no fix will come.LIKELY_VULNERABLE.
Confirm against the vendor advisory; the fix may be pending or the changelog unavailable.UNKNOWN, with the reason string saying which inputs were missing.Human output and JSON carry the same fields. JSON keys are in parentheses.
| Field | Meaning |
|---|---|
Running kernel (kernel) | uname -r or the override. |
Kernel package (package, package_version) | Installed package for the running kernel, when found. |
Changelog has CVE (changelog_mentions_cve) | yes, no, unavailable, or not_checked. |
Upstream version (upstream_version_verdict) | Result of step 2 above, including VENDOR_KERNEL. |
net.mptcp.enabled (mptcp_enabled) | 1 raises exposure; the reported lab exploit targeted MPTCP listeners. |
tcp_migrate_req (tcp_migrate_req) | 1 enables the request-migration variant of the bug. n/a on kernels before 5.14, which have neither the sysctl nor the variant. |
IP-options drop rule (ip_options_drop_rule) | nftables, iptables, iptables-legacy-location, or no. An nftables table without the drop rule, for example after a flush, reports no. |
dropped so far (drop_counter) | Packets the rule has dropped. Use it to correlate with remote-probe.py --repeat N. |
Interim mitigation (mitigation) | none, partial, full, with +mptcp_off when MPTCP is disabled. |
Mitigation coverage (mitigation_coverage) | complete, or incomplete naming datapaths that bypass host netfilter. |
NetLabel/CIPSO (netlabel_cipso) | no, or where a CIPSO configuration was found. |
Firewall managers (firewall_managers) | Active firewalld, ufw, nftables.service, kube-proxy, docker. Informational. |
| IPv4 TCP / MPTCP listeners | Counts from ss. n/a when ss rejects the option, as the Ubuntu 18.04 ss does for MPTCP. |
Exposure (exposure) | One-line summary of the factors above. |
| verdict / reason | Final patch-state verdict and why. |
iptables-legacy-location means a rule from an earlier version of this script sits in
filter/INPUT. It still protects the host stack but not forwarded container traffic; the next
--mitigate moves it.
--mitigate doesThese reduce exposure until the kernel is updated. They are not a fix.