KernelScan.io

HIGH

net/sched teql Qdisc UAF

CVE-2026-23074

CVSS 7.8 / 10.0 NVD

CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI7.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: net/sched: Enforce that teql can only be used as root qdisc Design intent of teql is that it is only supposed to be used as root qdisc. We need to check for that constraint. Although not important, I will describe the scenario that unearthed this issue for the curious. GangMin Kim <km.kim1503@gmail.com> managed to concot a scenario as follows: ROOT qdisc 1:0 (QFQ) ├── class 1:1 (weight=15, lmax=16384) netem with delay 6.4s └── class 1:2 (weight=1, lmax=1514) teql GangMin sends a packet which is enqueued to 1:1 (netem). Any invocation of dequeue by QFQ from this class will not return a packet until after 6.4s. In the meantime, a second packet is sent and it lands on 1:2. teql's enqueue will return success and this will activate class 1:2. Main issue is that teql only updates the parent visible qlen (sch->q.qlen) at dequeue. Since QFQ will only call dequeue if peek succeeds (and teql's peek always returns NULL), dequeue will never be called and thus the qlen will remain as 0. With that in mind, when GangMin updates 1:2's lmax value, the qfq_change_class calls qfq_deact_rm_from_agg. Since the child qdisc's qlen was not incremented, qfq fails to deactivate the class, but still frees its pointers from the aggregate. So when the first packet is rescheduled after 6.4 seconds (netem's delay), a dangling pointer is accessed causing GangMin's causing a UAF.

02

Engine v0.2.0

Risk summary

A local attacker with network administration privileges can cause a use-after-free vulnerability by misconfiguring traffic control schedulers, potentially leading to kernel crashes or privilege escalation. The attack requires specific knowledge of Linux traffic control and the ability to create complex qdisc hierarchies.

Affectednet/sched/sch_teql.c

Vulnerability analysis

Root Cause: The teql qdisc was designed to only be used as a root qdisc but lacked enforcement of this constraint. When used as a child qdisc under QFQ, teql's queue length management behavior creates a mismatch - it only updates the parent-visible qlen at dequeue time, but its peek function always returns NULL, preventing dequeue from being called. This causes the parent QFQ scheduler to incorrectly manage class activation/deactivation, leading to dangling pointers when class parameters are updated.

Attack Surface: Local attack requiring CAP_NET_ADMIN privileges to configure traffic control qdiscs. The vulnerability is triggered through the tc command or netlink interface when creating a specific qdisc hierarchy with teql as a child qdisc under QFQ, followed by parameter updates that trigger the UAF condition.

Fix Mechanism: The patch adds a simple check in teql_qdisc_init() to verify that sch->parent == TC_H_ROOT, returning -EOPNOTSUPP with an error message if teql is being attached as a child qdisc. This enforces the design constraint and prevents the problematic configuration that leads to the UAF.

03

BranchFixed inPatch commit
5.105.10.24973d970ff0edd
5.155.15.199ae810e6a8ac4
6.16.1.162dad49a67c2d8
6.126.12.684c7e8aa71c92
6.186.18.816ed73c1282d
6.66.6.1220686bedfed34
mainline6.1950da4b9d07a7