Skip to contentSkip to conversation

CVE-2026-99688: net/sched: sch_qfq: prevent aggregate self-replacement

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 20

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

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

net/sched: sch_qfq: prevent aggregate self-replacement

qfq_change_class() snapshots the current aggregate settings while holding the qdisc tree lock, but drops the lock before selecting the destination aggregate. During that gap, qfq_enqueue() can move the class to an aggregate matching the requested settings.

When qfq_change_class() resumes, qfq_find_agg() then returns cl->agg. If it is a singleton, qfq_deact_rm_from_agg() frees the aggregate before qfq_add_to_agg() immediately accesses the same pointer, causing a use-after-free.

While holding the tree lock, skip the replacement when the destination is already the current aggregate. Any estimator replacement has already completed, so the class change can finish normally.

The Linux kernel CVE team has assigned CVE-2026-99688 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 3.8 with commit 462dbc9101acd38e92eda93c0726857517a24bbd and fixed in 6.12.118 with commit 374ea8200331708ead0ba524b5c8cd9640515fd5
	Issue introduced in 3.8 with commit 462dbc9101acd38e92eda93c0726857517a24bbd and fixed in 6.18.64 with commit 11c4ba0c976415176a6d82d6051457455d5b7e40
	Issue introduced in 3.8 with commit 462dbc9101acd38e92eda93c0726857517a24bbd and fixed in 7.3.5 with commit 519f327c7fd1b67327de2e1cff6fbe85a02a151b
	Issue introduced in 3.8 with commit 462dbc9101acd38e92eda93c0726857517a24bbd and fixed in 7.4-rc2 with commit 2e54b3e187300893688c2c7517894f5d96732e05

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-99688

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
net/sched/sch_qfq.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/374ea8200331708ead0ba524b5c8cd9640515fd5
	https://git.kernel.org/stable/c/11c4ba0c976415176a6d82d6051457455d5b7e40
	https://git.kernel.org/stable/c/519f327c7fd1b67327de2e1cff6fbe85a02a151b
	https://git.kernel.org/stable/c/2e54b3e187300893688c2c7517894f5d96732e05