Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
cve-2026-98432-mitigation — Audits Debian/Ubuntu kernels for CVE-2026-98432 and applies persistent nftables and sysctl mitigations, then guides kernel upgrade and rollback. | Kitploit
Tools/GitHubGitHub/igreklg/cve-2026-98432-mitigation
Defensive ToolsVulnerability AnalysisScripting & AutomationConfiguration AuditingNetwork SecurityMisconfigurationIncident Response
GitHubigreklg/cve-2026-98432-mitigation

cve-2026-98432-mitigation

Audits Debian/Ubuntu kernels for CVE-2026-98432 and applies persistent nftables and sysctl mitigations, then guides kernel upgrade and rollback.

View Repository
32 days agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2026-98432: audit and temporary mitigation for Debian / Ubuntu

The script checks whether the kernel is patched against CVE-2026-98432 (use-after-free in IPv4 TCP handling, CVSS 9.8). If the kernel is not patched, it immediately enables a temporary mitigation and helps install the kernel update.

The mitigation reduces risk but does not eliminate the vulnerability. There is only one complete solution: install the patched kernel and reboot. According to Red Hat's assessment, packet filtering with IP options does not fully rule out exploitation.

About the vulnerability

  • Where the bug is. When establishing a TCP connection, tcp_v4_syn_recv_sock() passes ireq_opt to the child socket without copying it, and inet_sock_destruct() frees it with a regular kfree(). A repeated SYN, which is being processed at that moment on another CPU core, accesses already freed memory in ip_options_build().
  • Who can attack. Any host that can reach an open TCP port, without authentication. The attack requires a SYN with IPv4 Record Route or Timestamp options.
  • Second vulnerable path. Migration of requests between listening sockets: net.ipv4.tcp_migrate_req=1 or the BPF program BPF_SK_REUSEPORT_SELECT_OR_MIGRATE.
  • The role of MPTCP. The published exploit attacks an MPTCP listener. Go 1.24+ programs listen via MPTCP by default. But the bug itself is not tied to MPTCP.
  • Affected versions. Kernels starting from 4.4. Upstream fix: ipv4: free inet_opt and ireq_opt after an RCU grace period (e3f33b0a1d89).
Stable branchFixed in
5.105.10.272
5.155.15.223
6.16.1.190
6.66.6.159
6.126.12.113
6.186.18.56
7.27.2.10
mainline7.3

Status in distributions as of November 2, 2026:

  • Debian 12: fixed in linux 6.1.190-1 (DLA-4841-1) and linux-6.12 6.12.113-1~deb12u1 (DLA-4850-1).
  • Debian 13: fixed in linux 6.12.113-1 (DSA-6568-1).
  • Ubuntu 22.04, 24.04 and newer: the fix has not yet been released. Ubuntu 16.04–20.04: listed as vulnerable, no fix available.

What the script does

  1. Audit. Determines whether the running kernel and each installed kernel have been fixed (see the "How fixedness is determined" section).
  2. Protection if the kernel is not fixed. Enabled as the first step: without network, without prompts, and before any apt calls.
    • Drops incoming IPv4 TCP packets with IP options (IHL > 5) in the prerouting hook with raw priority (−300), that is, before the kernel parses the options. Uses nftables, or if it is unavailable, iptables with the u32 module.
    • Sets net.mptcp.enabled = 0. Already open MPTCP sockets remain MPTCP, so the script lists them so you can restart those services.
    • Sets net.ipv4.tcp_migrate_req = 0 if the value was 1.
    • Makes the protection persistent: a systemd unit, reapplication after nftables / netfilter-persistent / firewalld restart, and a check via timer every 5 minutes.
  3. Kernel update. Looks for updates and checks whether the fix is present in the specific new kernel, not in the metapackage. Then offers to install, defaulting to "yes". A kernel update is recommended even if the fix in it is not confirmed: it closes other vulnerabilities.
  4. Summary. Prints the actual state re-read from the system and exits with a clear return code.

If the running kernel is already fixed, the script changes nothing and suggests how to remove previously enabled protection.

Requirements

  • Debian 11/12/13, Ubuntu 20.04/22.04/24.04 and derivatives. Debian 11 and Ubuntu 20.04 without Ubuntu Pro no longer receive kernel fixes: on them the script will enable protection but will not find updates.
  • Root privileges.
  • nftables (recommended) or iptables. Persistent protection requires systemd.

Usage

git clone https://github.com/IgrekLg/cve-2026-98432-mitigation.git
cd cve-2026-98432-mitigation
sudo bash mitigate-cve-2026-98432.sh            # аудит, защита, предложение обновить ядро
sudo bash mitigate-cve-2026-98432.sh --status   # только посмотреть, ничего не меняя
KeyAction
--statusShow status only
--uninstallRemove protection and restore the original sysctl values (if the kernel is not patched, it will ask for confirmation)
-y, --yesNo questions asked: install the kernel update, confirm --uninstall
--no-upgradeDo not contact apt: audit and protect only
--forceEnable protection even if the kernel is already patched
--keep-mptcpDo not disable MPTCP
--keep-tcp-migrateDo not touch net.ipv4.tcp_migrate_req

If there is no terminal (Ansible, cron, ssh without -t) and --yes is not specified, protection is still enabled, and the kernel installation is skipped with a hint.

Return codes

CodeMeaning
0The running kernel is patched or unaffected
3The kernel is not patched, protection is active: an update and reboot are required
4The kernel is not patched, protection is not active
1Error
2Invalid arguments

Example for Ansible:

- name: CVE-2026-98432 mitigation
  ansible.builtin.script: mitigate-cve-2026-98432.sh --yes
  register: cve
  failed_when: cve.rc not in [0, 3]
  changed_when: false

How kernel patched status is determined

Checks are performed in order:

  1. Kernel package changelog. If it mentions CVE-2026-98432 or the title of the fixing commit, the kernel is patched.
  2. Debian and derivatives with versions of the form 6.1.190-1. The upstream part of the version is compared against the table above. Debian receives fixes through stable updates, and the CVE number is not always specified in the changelog.
  3. Ubuntu. The version number (5.15.0-NNN) does not reflect the stable branch, so the kernel is considered patched only based on the changelog. Without it, the status is "fix not confirmed", and the protection is enabled. Additionally, pro fix CVE-2026-98432 --dry-run is output.
  4. Kernel not from a package (mainline or a custom build): the version from uname -r is compared. Release-candidate kernels (-rc) are considered unknown.

The table of fixed versions is hardcoded into the script (FIXED_IN, data as of 2026-11-02). For derivative distributions with their own kernels (Proxmox, etc.), consult the vendor's bulletin.

What gets installed

PathPurpose
/usr/local/sbin/cve-2026-98432-fwHelper: apply / ensure / remove / check
/etc/cve-2026-98432/mitigation.nftnftables rule (table ip cve_2026_98432)
/etc/systemd/system/cve-2026-98432-mitigation.serviceApplies the rule at boot, before network-pre.target
/etc/systemd/system/cve-2026-98432-mitigation-check.{service,timer}Check every 5 minutes, restores the rule if someone removed it (logs to syslog)
/etc/systemd/system/{nftables,netfilter-persistent,firewalld}.service.d/50-cve-2026-98432.confRe-applies after (re)loading of rules by these services; created only for installed ones
/etc/sysctl.d/99-zz-cve-2026-98432.confsysctl; the name is chosen so that the file is read after /etc/sysctl.conf
/var/lib/cve-2026-98432/sysctl.origOriginal sysctl values for --uninstall

Files from the previous version of the script (mitigate-CVE-2026-98432.service, 99-CVE-2026-98432.conf and duplicate iptables rules) are removed automatically.

Side effects and limitations

Download Tool