
Read-only Linux kernel checker for CVE-2026-98432 that detects vulnerable or unpatched kernels, flags reboot-required states, and offers optional patching, sysctl mitigation, and forensics.
A batch check and remediation tool for the race condition → Use-After-Free vulnerability (introduced in Linux 4.4) in the Linux kernel IPv4 TCP handshake path.
This script is intended for self-checking your own servers and contains no exploit code.
Manually checking this has three common pitfalls, and the script handles all three:
uname -r leads to misjudgment — therefore, for Debian-based systems, it uses dpkg --compare-versions to compare package versions rather than guessing version numbers.REBOOT_REQUIRED.net.mptcp.enabled=1 is the kernel default and does not mean there is an MPTCP listener — the real criterion is whether there is a listening line with netid == mptcp in ss -Mltnp. Moreover, on older kernels ss -M produces false positives, so the script splits results into two tiers: confirmed / suspected.# 只体检,不改任何东西(推荐先跑这个)
curl -fsSL https://raw.githubusercontent.com/xxhjkl/cve-2026-98432-check/main/cve-2026-98432-check.sh -o /tmp/cve-check.sh
less /tmp/cve-check.sh # 建议先看一眼再执行
sudo bash /tmp/cve-check.sh
For production environments, it is recommended to pin the commit SHA or tag to prevent upstream changes from silently affecting the entire batch of machines:
curl -fsSL https://raw.githubusercontent.com/xxhjkl/cve-2026-98432-check/v2.0/cve-2026-98432-check.sh -o /tmp/cve-check.sh
| Parameter | Purpose |
|---|---|
| No parameters | Read-only health check, outputs a report |
--json | Additionally outputs one line of JSON for batch aggregation |
-q / --quiet | Outputs only the conclusion line |
--fix | Installs/upgrades the kernel package (no reboot) |
--mitigate | Applies temporary sysctl mitigation when no patch is available |
--mitigate --nft | Additionally uses nftables to drop IPv4 TCP packets with IP options |
--no-refresh | Does not refresh the apt index (strict read-only scenarios; conclusions may be outdated) |
--forensics | Appends a read-only intrusion investigation (takes a dozen seconds) |
--since YYYY-MM-DD | Start of the investigation time window, defaults to 2026-10-15 (vulnerability disclosure date) |
--reboot | Reboots after installation (prints a countdown first, can be cancelled with Ctrl-C) |
-h / --help | Usage |
Read-only by default. Without --fix / --mitigate / --reboot, the script will not modify any system state.
| status | Meaning | Exit code |
|---|---|---|
FIXED | Running kernel already contains the fix | 0 |
NOT_AFFECTED | Kernel is earlier than 4.4, or the vendor states it is not affected (e.g., RHEL 7) | 0 |
REBOOT_REQUIRED | Fixed version is installed, only a reboot is needed | 10 |
PATCH_AVAILABLE | A patch exists but is not installed | 11 |
NO_FIX_YET | Affected and the vendor has no patch yet, temporary mitigation required | 12 |
CONTAINER | Inside a container, the kernel is provided by the host, contact the service provider | 13 |
UNKNOWN | Cannot be determined from the version alone, check the vendor advisory | 14 |
EOL | The system is EOL, no official patch will be available | 15 |
CUSTOM_KERNEL | Running a third-party kernel (XanMod / Liquorix / self-compiled), patches must come from its own source | 16 |
When the report determines the system is affected, adding --forensics appends a read-only investigation. It does not modify any files or clean anything up—forensics comes before remediation.
sudo bash cve-2026-98432-check.sh --forensics
sudo bash cve-2026-98432-check.sh --forensics --since 2026-10-01 # 自定义时间窗
Checks fall into two tiers:
High risk (basically confirms compromise if seen)
| Check | Criterion |
|---|---|
| UID=0 accounts | Any UID=0 other than root |
/etc/ld.so.preload | Non-empty → userland rootkit injection |
| Process executables | Running from /tmp, /dev/shm, or (deleted) |
Attention (requires manual review, mostly normal operations)
| Check | Criterion |
|---|---|
| SSH public keys | authorized_keys exists; list count, mtime, command=/from= restrictions |
| Persistence | cron modified within the time window / newly added systemd units / unexpectedly present rc.local |
| Auth files | /etc/passwd, /etc/shadow, /etc/sudoers, sshd_config modified within the time window |
| Outbound connections | Established connections whose peer is not internal/local |
| Login records | Successful SSH logins whose source is not internal/local |
| Binary changes | Files changed within the time window under /usr/local/{bin,sbin}, /root |
Output a single summarizable result line at the end:
FORENSICS|serv|high=0|warn=2|since=2026-10-15
Limitations: This is probabilistic detection; passing does not mean absolutely clean. When high is not 0, memory and disk forensics should be performed rather than direct cleanup.
# 分发
for h in host1 host2 host3; do
scp -q cve-2026-98432-check.sh "$h:/root/"
done
# 体检并汇总
: > /tmp/cve-report.json
for h in host1 host2 host3; do
ssh "$h" 'bash /root/cve-2026-98432-check.sh -q --json' >> /tmp/cve-report.json 2>&1
done
grep -oE '"status":"[A-Z_]+"' /tmp/cve-report.json | sort | uniq -c
| Distribution | Determination method |
|---|---|
| Debian 12 / 13 | Upstream version number + dpkg --compare-versions, can be determined precisely |
| Debian ≤ 11 | Determined as EOL |
| Ubuntu 16.04–20.04 | Determined as EOL (vendor explicitly does not provide fixes) |
| Ubuntu 22.04+ | Per vendor status table (no fixed kernel as of the baseline date) |
| RHEL / CentOS / Rocky / Alma / Oracle 7 | Not affected |
| RHEL 8/9/10, OpenShift | Per vendor status table (fix postponed as of the baseline date) |
| Amazon Linux 2023 | Indicates the fixed package version |
NO_FIX_YET). To update: modify the FIXED_PATCH associative array at the top of the file, as well as the version numbers in debian_fixed_pkg().--reboot is explicitly specified). Kernel patches do not take effect without a reboot, which is the most commonly overlooked step in actual remediation.uname -r shows the host kernel, and neither internal upgrades nor reboots will have any effect.--mitigate --nft are lost after a reboot; if needed, write them to /etc/nftables.conf. Do not add this rule on networks that use CIPSO / NetLabel tagging.