Skip to contentSkip to conversation

CVE-2026-99546: net/sched: cls_flower: avoid stale mask references after delete

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Nov 19

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: cls_flower: avoid stale mask references after delete

Flower releases a mask reference when a filter is removed from the classifier. The filter object can remain alive while dump, walk, or hardware reoffload paths hold a reference to it. Those paths can then dereference f->mask after the mask has already been released.

Keep the mask reference until the filter reference count reaches zero. Release the mask synchronously from the final __fl_put() while the caller still holds the tcf_proto reference, and leave the existing RCU work to free the mask. This keeps the mask available to every reader that still holds the filter.

The filter is still removed from the classifier indexes immediately. Therefore, a deleted filter can temporarily retain an otherwise empty mask; fl_delete() uses the handle IDR, rather than the mask list, to determine whether the classifier has become empty.

Failed mask assignment can leave fnew->mask as an error or borrowed pointer without an owned mask reference. Clear it before the common failure path so the final put cannot release an unowned reference.

This fix does not add fields, snapshots, or per-filter memory.

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

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

	Issue introduced in 5.2 with commit 92149190067dc1ba656ce63a328c4b88b34e3f09 and fixed in 6.12.117 with commit 47ae95cdcb9b1d6770c624ae778828b1d698801a
	Issue introduced in 5.2 with commit 92149190067dc1ba656ce63a328c4b88b34e3f09 and fixed in 6.18.61 with commit cdffcb89d84455158d057a6baa87a67225a7f062
	Issue introduced in 5.2 with commit 92149190067dc1ba656ce63a328c4b88b34e3f09 and fixed in 7.3.2 with commit 0cc691a899a43e8ecbddfe657198b3f6935122f0
	Issue introduced in 5.2 with commit 92149190067dc1ba656ce63a328c4b88b34e3f09 and fixed in 7.4-rc1 with commit 58f7989da6e715ce834ac861b7ba6ae9f9bdb098

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

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/cls_flower.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/47ae95cdcb9b1d6770c624ae778828b1d698801a
	https://git.kernel.org/stable/c/cdffcb89d84455158d057a6baa87a67225a7f062
	https://git.kernel.org/stable/c/0cc691a899a43e8ecbddfe657198b3f6935122f0
	https://git.kernel.org/stable/c/58f7989da6e715ce834ac861b7ba6ae9f9bdb098