Linux Kernel ICMP Fragmentation-Needed NULL Pointer Dereference (CVE-2026-23398)
by zpol · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-23398
- Category
- network
- Affected product
- Linux kernel, icmp_tag_validation() / icmp_unreach() in net/ipv4/icmp.c
- Affected versions
- Kernels predating the March 2026 fix (commit 614aefe56af8e); PoC reproduces on mainline 6.12.0 (2024-11 build)
- Disclosed
- 2026-07-05
- Patch status
- patched
Tags
References
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-04 |
| Author / Researcher | zpol |
| CVE / Advisory | CVE-2026-23398 |
| Category | network |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | linux-kernel, icmp, denial-of-service, null-pointer-dereference, kernel-panic, pmtu, scapy, remote-dos |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Linux kernel, icmp_tag_validation() / icmp_unreach() in net/ipv4/icmp.c |
| Versions Affected | Kernels predating the March 2026 fix (commit 614aefe56af8e); PoC reproduces on mainline 6.12.0 (2024-11 build) |
| Language / Platform | Python (Scapy) PoC targeting the Linux networking stack; lab built on QEMU + Docker |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
CVE-2026-23398 is a NULL pointer dereference in the Linux kernel’s ICMP handling path, reachable when a host has net.ipv4.ip_no_pmtu_disc set to 3 (a hardened Path MTU Discovery mode) and receives a crafted ICMP “Fragmentation Needed” (type 3, code 4) packet. The quoted inner IPv4 header inside the ICMP payload references a protocol number that has no registered handler in inet_protos[], and icmp_tag_validation() dereferences that missing handler pointer without a NULL check, panicking the kernel. The archived PoC ships a full reproduction lab (QEMU victim VM + a Dockerized Scapy sender) plus a standalone Python script that crafts and sends the offending ICMP packet, and includes a captured serial-console dump showing the resulting kernel oops.
Vulnerability Details
Root Cause
icmp_unreach() / icmp_tag_validation() looks up the protocol handler for the quoted inner datagram’s protocol field in inet_protos[] and dereferences it without verifying the entry is non-NULL, which is reachable when the inner protocol number has no registered handler.
Attack Vector
- Identify (or provision) a target running a pre-fix Linux kernel with
net.ipv4.ip_no_pmtu_disc = 3. - Craft an ICMP type 3, code 4 packet whose embedded/quoted original IPv4 header sets
prototo an unregistered value (default253in the PoC). - Send the packet to the target over any reachable IPv4 path (raw socket / Scapy, no authentication needed).
- The kernel’s ICMP receive path dereferences the missing protocol handler and panics.
Impact
Unauthenticated, remote denial of service — a single crafted ICMP packet can panic a vulnerable host configured with the hardened PMTU sysctl.
Environment / Lab Setup
Target: Linux kernel 6.12.0 (pre-fix mainline build) in a QEMU VM, net.ipv4.ip_no_pmtu_disc=3
Attacker: Python 3 + Scapy (root/CAP_NET_RAW), or Docker + docker-compose sender image
Proof of Concept
PoC Script
See
send_frag_needed.py,send-payload-to-host.sh,docker-compose.yml/Dockerfile, and thescripts//vm/lab-automation files in this folder.
| |
The script builds an outer IP/ICMP(type=3, code=4) packet whose payload is a quoted inner IPv4 header (rare protocol number + 8 bytes) and sends it to the target. send-payload-to-host.sh resolves a hostname/IP and prefers running the send through the bundled Docker sender (CAP_NET_RAW), falling back to a local sudo Python invocation. The lab scripts (scripts/, vm/) provision a disposable QEMU victim with a vulnerable kernel to observe the panic end-to-end; victim_dump.log in this folder is the serial-console capture from a successful trigger.
Detection & Indicators of Compromise
BUG: kernel NULL pointer dereference, address: 0000000000000010
RIP: 0010:icmp_unreach+0x21c/0x280
Signs of compromise:
- Kernel panic/oops referencing
icmp_unreachshortly after inbound ICMP type 3 code 4 traffic. - Unusual ICMP Fragmentation-Needed packets whose quoted inner IP header uses uncommon/experimental protocol numbers.
- Host becomes unresponsive (SSH/network hangs) immediately following such traffic.
Remediation
| Action | Detail |
|---|---|
| Primary fix | Upgrade to a kernel containing the March 2026 fix icmp: fix NULL pointer dereference in icmp_tag_validation() (commit 614aefe56af8e). |
| Interim mitigation | Avoid setting net.ipv4.ip_no_pmtu_disc=3 on internet-facing hosts, and/or filter or rate-limit inbound ICMP type 3 traffic at the network edge. |
References
Notes
Mirrored from https://github.com/zpol/cve-2026-23398-poc on 2026-07-05.
| |