CVE-2026-23398: icmp: fix NULL pointer dereference in icmp_tag_validation()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
icmp: fix NULL pointer dereference in icmp_tag_validation()
icmp_tag_validation() unconditionally dereferences the result of rcu_dereference(inet_protos[proto]) without checking for NULL. The inet_protos[] array is sparse -- only about 15 of 256 protocol numbers have registered handlers. When ip_no_pmtu_disc is set to 3 (hardened PMTU mode) and the kernel receives an ICMP Fragmentation Needed error with a quoted inner IP header containing an unregistered protocol number, the NULL dereference causes a kernel panic in softirq context.
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000002: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000010-0x0000000000000017] RIP: 0010:icmp_unreach (net/ipv4/icmp.c:1085 net/ipv4/icmp.c:1143) Call Trace: <IRQ> icmp_rcv (net/ipv4/icmp.c:1527) ip_protocol_deliver_rcu (net/ipv4/ip_input.c:207) ip_local_deliver_finish (net/ipv4/ip_input.c:242) ip_local_deliver (net/ipv4/ip_input.c:262) ip_rcv (net/ipv4/ip_input.c:573) __netif_receive_skb_one_core (net/core/dev.c:6164) process_backlog (net/core/dev.c:6628) handle_softirqs (kernel/softirq.c:561) </IRQ>
Add a NULL check before accessing icmp_strict_tag_validation. If the protocol has no registered handler, return false since it cannot perform strict tag validation.
The Linux kernel CVE team has assigned CVE-2026-23398 to this issue.
Affected and fixed versions
===========================
Issue introduced in 3.14 with commit 8ed1dc44d3e9e8387a104b1ae8f92e9a3fbf1b1e and fixed in 6.1.167 with commit 1f9f2c6d4b2a613b7756fc5679c5116ba2ca0161 Issue introduced in 3.14 with commit 8ed1dc44d3e9e8387a104b1ae8f92e9a3fbf1b1e and fixed in 6.6.130 with commit b61529c357f1ee4d64836eb142a542d2e7ad67ce Issue introduced in 3.14 with commit 8ed1dc44d3e9e8387a104b1ae8f92e9a3fbf1b1e and fixed in 6.12.78 with commit 9647e99d2a617c355d2b378be0ff6d0e848fd579 Issue introduced in 3.14 with commit 8ed1dc44d3e9e8387a104b1ae8f92e9a3fbf1b1e and fixed in 6.18.20 with commit d938dd5a0ad780c891ea3bc94cae7405f11e618a Issue introduced in 3.14 with commit 8ed1dc44d3e9e8387a104b1ae8f92e9a3fbf1b1e and fixed in 6.19.10 with commit 1e4e2f5e48cec0cccaea9815fb9486c084ba41e2 Issue introduced in 3.14 with commit 8ed1dc44d3e9e8387a104b1ae8f92e9a3fbf1b1e and fixed in 7.0-rc5 with commit 614aefe56af8e13331e50220c936fc0689cf5675
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-23398
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
net/ipv4/icmp.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/1f9f2c6d4b2a613b7756fc5679c5116ba2ca0161 https://git.kernel.org/stable/c/b61529c357f1ee4d64836eb142a542d2e7ad67ce https://git.kernel.org/stable/c/9647e99d2a617c355d2b378be0ff6d0e848fd579 https://git.kernel.org/stable/c/d938dd5a0ad780c891ea3bc94cae7405f11e618a https://git.kernel.org/stable/c/1e4e2f5e48cec0cccaea9815fb9486c084ba41e2 https://git.kernel.org/stable/c/614aefe56af8e13331e50220c936fc0689cf5675