net/sched: ets: Always remove class from active list before deleting in ets_qdisc_change
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ de6d25924c2a8c2988c6a385990cafbe742061bf · < 45466141da3c98a0c5fa88be0bc14b4b6a4bd75c| No fix yet |
| Linux Linux |
|
|
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); }
From the CVE record · Linux
A race between ETS scheduler dequeue and configuration changes can cause a use-after-free of a Qdisc object. An attacker who can create new user and network namespaces can trigger the bug; the input does not specify any additional authentication or user-interaction requirements.
Engineers running Linux kernels with the ETS scheduler should check their versions; affected versions are not specified in the input.