Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7DD82D46A0 for ; Thu, 3 Jul 2025 08:37:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531829; cv=none; b=EvIhzq/IaQmxVrP82ckXkTolN3ADa2qNYBwHkY3nF1ybHbQPXQtqyaREBJVBGhNm2sB38e3jl5mCFdLaqS+8oqMpKj7WrDW9sIP/WZW4+jyAQ1hh90dMCjZBgSB9wkfigqW7/QMb1tI4AQcpfWJv/CeMmggVIVXrc07bqMXTgX0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531829; c=relaxed/simple; bh=Qu4/nkQBjT0rETRB9nQ8PUhZLJ3VHOHGGlv/v9kdnj8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NfBUlJQ2Qs66bx5vwBSqySVmyXK9IMu7hQEZyoxDhVpzkC0Js03/EbRKsb3l6AenvVWcAzUYFEezyHGi0OqhkfAGRKbZFG8tMUAVadjERBIuEW6DRE4S77Y5Vj3CGJOnW/o3/X54dFaJpN+FJE2np7Lh2jijQrgiHqufcLDf4G4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=LU6lkfDS; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="LU6lkfDS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00682C4CEEB; Thu, 3 Jul 2025 08:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751531829; bh=Qu4/nkQBjT0rETRB9nQ8PUhZLJ3VHOHGGlv/v9kdnj8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=LU6lkfDSdLlrOlqll/eZa6cs9ruDsu6JueJTp8PEnIVBU/PDvch/G6lWDCIstdmiK mvHwH5m5KwZ+JjLqUGkFy3FggVhleUO3WTVl52DXy4BANh8f64GxbKC0oY58BEQ6UB PPmqQypCLO6IQRjCPWRoMwGyZtmH07Js0Rop9eR0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38107: net_sched: ets: fix a race in ets_qdisc_change() Date: Thu, 3 Jul 2025 10:35:24 +0200 Message-ID: <2025070323-CVE-2025-38107-9344@gregkh> X-Mailer: git-send-email 2.50.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3731; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=04lYsBw5R2uQOkYBS0fJsPD43qrL/LN87q5TcGsECeM=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlpDqcNmhmMn7pPr9sh9l5VbCPbYr+rwVtOp/+dtPT0U zPm7d9MOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiG6wY5tmL3LgjNeF18s8X 03I2fzS521t5y4lhwYXJE3SaV7BHHY4N/+Xlwb5mW1MyGwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: net_sched: ets: fix a race in ets_qdisc_change() Gerrard Tai reported a race condition in ETS, whenever SFQ perturb timer fires at the wrong time. The race is as follows: CPU 0 CPU 1 [1]: lock root [2]: qdisc_tree_flush_backlog() [3]: unlock root | | [5]: lock root | [6]: rehash | [7]: qdisc_tree_reduce_backlog() | [4]: qdisc_put() This can be abused to underflow a parent's qlen. Calling qdisc_purge_queue() instead of qdisc_tree_flush_backlog() should fix the race, because all packets will be purged from the qdisc before releasing the lock. The Linux kernel CVE team has assigned CVE-2025-38107 to this issue. Affected and fixed versions =========================== Issue introduced in 5.10.142 with commit 699d82e9a6db29d509a71f1f2f4316231e6232e6 and fixed in 5.10.239 with commit eb7b74e9754e1ba2088f914ad1f57a778b11894b Issue introduced in 5.15.66 with commit ce881ddbdc028fb1988b66e40e45ca0529c23b46 and fixed in 5.15.186 with commit 0b479d0aa488cb478eb2e1d8868be946ac8afb4f Issue introduced in 6.0 with commit b05972f01e7d30419987a1f221b5593668fd6448 and fixed in 6.1.142 with commit 347867cb424edae5fec1622712c8dd0a2c42918f Issue introduced in 6.0 with commit b05972f01e7d30419987a1f221b5593668fd6448 and fixed in 6.6.94 with commit 0383b25488a545be168744336847549d4a2d3d6c Issue introduced in 6.0 with commit b05972f01e7d30419987a1f221b5593668fd6448 and fixed in 6.12.34 with commit 073f64c03516bcfaf790f8edc772e0cfb8a84ec3 Issue introduced in 6.0 with commit b05972f01e7d30419987a1f221b5593668fd6448 and fixed in 6.15.3 with commit fed94bd51d62d2e0e006aa61480e94e5cd0582b0 Issue introduced in 6.0 with commit b05972f01e7d30419987a1f221b5593668fd6448 and fixed in 6.16-rc2 with commit d92adacdd8c2960be856e0b82acc5b7c5395fddb Issue introduced in 5.4.213 with commit fffa19b5e58c34004a0d6f642d9c24b11d213994 Issue introduced in 5.19.8 with commit fb155f6597cd7bc3aeed668c3bb15fc3b7cb257d 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-38107 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_ets.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/eb7b74e9754e1ba2088f914ad1f57a778b11894b https://git.kernel.org/stable/c/0b479d0aa488cb478eb2e1d8868be946ac8afb4f https://git.kernel.org/stable/c/347867cb424edae5fec1622712c8dd0a2c42918f https://git.kernel.org/stable/c/0383b25488a545be168744336847549d4a2d3d6c https://git.kernel.org/stable/c/073f64c03516bcfaf790f8edc772e0cfb8a84ec3 https://git.kernel.org/stable/c/fed94bd51d62d2e0e006aa61480e94e5cd0582b0 https://git.kernel.org/stable/c/d92adacdd8c2960be856e0b82acc5b7c5395fddb