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 C9B1D2C1585 for ; Thu, 3 Jul 2025 08:36:08 +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=1751531768; cv=none; b=SDxqSWoay3d3A9XL16nIUhWaN3VfKiK7rzbJFCDgQpnEGv+Xp+Uft3gGm0O2mNw+Z1+hz0FiH6KL7g7CbBhPbHUk9c9TMn/3sx7UvJWBiAEdhVjAWzGqqPYxT9eETe5gHlKCqvzg/RO8DS85VgqezPTPPuUV64ot42y2w2Soek4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751531768; c=relaxed/simple; bh=ipIu44zVj7QIyJdiWJQj9Qxm/AI5+Ex2fGpZZRqxZHs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pwKKuhrDpl9lGLbKgUvbS+R4L0Mma8K9S+Mf7977+bCMXWsYPWmJ8RC8PrT2qLh40FDYeSyjNQ3lBFlvvq7Duh8itkMiHtc+kLvfnnB0NWBdRFoqYNpAJNWDTn+Csh54HSNGwnboSANalfOooiLWMYWXlXDkuHz4mxvqi7y39bA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=sI9ve6dS; 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="sI9ve6dS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E7233C4CEEB; Thu, 3 Jul 2025 08:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751531768; bh=ipIu44zVj7QIyJdiWJQj9Qxm/AI5+Ex2fGpZZRqxZHs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=sI9ve6dSRGVh6odNYnK+kELkoWA1K6boSYxD/GI7/dRH/m9XIzAvfY+Ja3l1Fy/at teSVOPbDHdKGNU43Wjl7mWk+XgSuxQw5kUS5Gqbm/xOk1h+l7wTnJtasgZjRBBPmqN 4xAvksUHiiOWcgPwfwOgFbfAf+Vm4FkHYedAi0S0= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38115: net_sched: sch_sfq: fix a potential crash on gso_skb handling Date: Thu, 3 Jul 2025 10:35:32 +0200 Message-ID: <2025070325-CVE-2025-38115-cce2@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=4024; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qChFEMYC2ws+4xxVFYteqER7iGWZwJQAaqI8XUyzs9E=; b=owGbwMvMwCRo6H6F97bub03G02pJDBlpDmfX/7HcYn9gXudGkW7GleINtv6aOQc6GNZ9P6zEb R68xm1pRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzkZTvDgibNqwHPrlo7T5sy v85969U7zzdfeMmwYGqB3Imkf9dzVvFs1tH8FODpdrnQGAA= 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: sch_sfq: fix a potential crash on gso_skb handling SFQ has an assumption of always being able to queue at least one packet. However, after the blamed commit, sch->q.len can be inflated by packets in sch->gso_skb, and an enqueue() on an empty SFQ qdisc can be followed by an immediate drop. Fix sfq_drop() to properly clear q->tail in this situation. ip netns add lb ip link add dev to-lb type veth peer name in-lb netns lb ethtool -K to-lb tso off # force qdisc to requeue gso_skb ip netns exec lb ethtool -K in-lb gro on # enable NAPI ip link set dev to-lb up ip -netns lb link set dev in-lb up ip addr add dev to-lb 192.168.20.1/24 ip -netns lb addr add dev in-lb 192.168.20.2/24 tc qdisc replace dev to-lb root sfq limit 100 ip netns exec lb netserver netperf -H 192.168.20.2 -l 100 & netperf -H 192.168.20.2 -l 100 & netperf -H 192.168.20.2 -l 100 & netperf -H 192.168.20.2 -l 100 & The Linux kernel CVE team has assigned CVE-2025-38115 to this issue. Affected and fixed versions =========================== Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 5.4.295 with commit c337efb20d6d9f9bbb4746f6b119917af5c886dc Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 5.10.239 with commit b44f791f27b14c9eb6b907fbe51f2ba8bec32085 Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 5.15.186 with commit 5814a7fc3abb41f63f2d44c9d3ff9d4e62965b72 Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 6.1.142 with commit 9c19498bdd7cb9d854bd3c54260f71cf7408495e Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 6.6.94 with commit b4e9bab6011b9559b7c157b16b91ae46d4d8c533 Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 6.12.34 with commit d1bc80da75c789f2f6830df89d91fb2f7a509943 Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 6.15.3 with commit 82448d4dcd8406dec688632a405fdcf7f170ec69 Issue introduced in 4.16 with commit a53851e2c3218aa30b77abd6e68cf1c371f15afe and fixed in 6.16-rc2 with commit 82ffbe7776d0ac084031f114167712269bf3d832 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-38115 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/c337efb20d6d9f9bbb4746f6b119917af5c886dc https://git.kernel.org/stable/c/b44f791f27b14c9eb6b907fbe51f2ba8bec32085 https://git.kernel.org/stable/c/5814a7fc3abb41f63f2d44c9d3ff9d4e62965b72 https://git.kernel.org/stable/c/9c19498bdd7cb9d854bd3c54260f71cf7408495e https://git.kernel.org/stable/c/b4e9bab6011b9559b7c157b16b91ae46d4d8c533 https://git.kernel.org/stable/c/d1bc80da75c789f2f6830df89d91fb2f7a509943 https://git.kernel.org/stable/c/82448d4dcd8406dec688632a405fdcf7f170ec69 https://git.kernel.org/stable/c/82ffbe7776d0ac084031f114167712269bf3d832