CVE-2026-23277: net/sched: teql: fix NULL pointer dereference in iptunnel_xmit on TEQL slave xmit
In the Linux kernel, the following vulnerability has been resolved:
net/sched: teql: fix NULL pointer dereference in iptunnelxmit on TEQL slave xmit
teqlmasterxmit() calls netdevstartxmit(skb, slave) to transmit through slave devices, but does not update skb->dev to the slave device beforehand.
When a gretap tunnel is a TEQL slave, the transmit path reaches iptunnelxmit() which saves dev = skb->dev (still pointing to teql0 master) and later calls iptunnelxmitstats(dev, pktlen). This function does:
getcpuptr(dev->tstats)
Since teqlmastersetup() does not set dev->pcpustattype to NETDEVPCPUSTATTSTATS, the core network stack never allocates tstats for teql0, so dev->tstats is NULL. getcpuptr(NULL) computes NULL + percpuoffset[cpu], resulting in a page fault.
BUG: unable to handle page fault for address: ffff8880e6659018 #PF: supervisor write access in kernel mode #PF: errorcode(0x0002) - not-present page PGD 68bc067 P4D 68bc067 PUD 0 Oops: Oops: 0002 [#1] SMP KASAN PTI RIP: 0010:iptunnelxmit (./include/net/iptunnels.h:664 net/ipv4/iptunnelcore.c:89) Call Trace: <TASK> iptunnelxmit (net/ipv4/iptunnel.c:847) grexmit (net/ipv4/ipgre.c:478) gretapxmit (net/ipv4/ipgre.c:779) teqlmasterxmit (net/sched/schteql.c:319) devhardstartxmit (net/core/dev.c:3887) schdirectxmit (net/sched/schgeneric.c:347) devqueuexmit (net/core/dev.c:4802) neighdirectoutput (net/core/neighbour.c:1660) ipfinishoutput2 (net/ipv4/ipoutput.c:237) ipfinishoutput.part.0 (net/ipv4/ipoutput.c:315) ipmcoutput (net/ipv4/ipoutput.c:369) ipsendskb (net/ipv4/ipoutput.c:1508) udpsendskb (net/ipv4/udp.c:1195) udpsendmsg (net/ipv4/udp.c:1485) inetsendmsg (net/ipv4/afinet.c:859) syssendto (net/socket.c:2206)
Fix this by setting skb->dev = slave before calling netdevstartxmit(), so that tunnel xmit functions see the correct slave device with properly allocated tstats.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Configuration
Apply the kernel fix so that teql_master_xmit updates skb->dev to the TEQL slave device before invoking netdev_start_xmit(skb, slave) / the slave transmit path (as described: “Fix this by setting skb->dev = slave before calling”).
Linux kernel networking (teql/gretap via sch_teql and iptunnel_xmit path) skb->dev update before transmit to TEQL slave = Set skb->dev = slave before calling teql_master_xmit transmit path
Event History
Frequently Asked Questions
What is the severity of CVE-2026-23277?
CVE-2026-23277 is classified as a medium severity vulnerability affecting the Linux kernel.
How do I fix CVE-2026-23277?
To fix CVE-2026-23277, you should update your Linux kernel to the latest patched version provided by your distribution.
What impact does CVE-2026-23277 have on system security?
CVE-2026-23277 can lead to a NULL pointer dereference in the Linux kernel, potentially causing system crashes.
Which versions of the Linux kernel are affected by CVE-2026-23277?
CVE-2026-23277 affects multiple versions of the Linux kernel prior to the patch release that addresses this vulnerability.
Is there a workaround for CVE-2026-23277?
There are no known workarounds for CVE-2026-23277; the recommended action is to apply the security patches.