Skip to contentSkip to conversation

CVE-2025-38193: net_sched: sch_sfq: reject invalid perturb period

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jul 4, 2025

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_sfq: reject invalid perturb period

Gerrard Tai reported that SFQ perturb_period has no range check yet, and this can be used to trigger a race condition fixed in a separate patch.

We want to make sure ctl->perturb_period * HZ will not overflow and is positive.

tc qd add dev lo root sfq perturb -10 # negative value : error
Error: sch_sfq: invalid perturb period.

tc qd add dev lo root sfq perturb 1000000000 # too big : error
Error: sch_sfq: invalid perturb period.

tc qd add dev lo root sfq perturb 2000000 # acceptable value
tc -s -d qd sh dev lo
qdisc sfq 8005: root refcnt 2 limit 127p quantum 64Kb depth 127 flows 128 divisor 1024 perturb 2000000sec
Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
backlog 0b 0p requeues 0

The Linux kernel CVE team has assigned CVE-2025-38193 to this issue.

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

	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 5.15.186 with commit 956b5aebb349449b38d920d444ca1392d43719d1
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.1.142 with commit b11a50544af691b787384089b68f740ae20a441b
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.6.95 with commit 0357da9149eac621f39e235a135ebf155f01f7c3
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.12.35 with commit f9b97d466e6026ccbdda30bb5b71965b67ccbc82
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.15.4 with commit 590b2d7d0beadba2aa576708a05a05f0aae39295
	Issue introduced in 2.6.12 with commit 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 and fixed in 6.16-rc2 with commit 7ca52541c05c832d32b112274f81a985101f9ba8

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-2025-38193

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_sfq.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/956b5aebb349449b38d920d444ca1392d43719d1
	https://git.kernel.org/stable/c/b11a50544af691b787384089b68f740ae20a441b
	https://git.kernel.org/stable/c/0357da9149eac621f39e235a135ebf155f01f7c3
	https://git.kernel.org/stable/c/f9b97d466e6026ccbdda30bb5b71965b67ccbc82
	https://git.kernel.org/stable/c/590b2d7d0beadba2aa576708a05a05f0aae39295
	https://git.kernel.org/stable/c/7ca52541c05c832d32b112274f81a985101f9ba8