From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 608983CAE8D; Wed, 30 Sep 2026 19:08:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790795297; cv=none; b=TQ+ML09up0g6XWpfxHEefnqweS66VvkTVLWlm0WWF53CXi2Y+z1QUHTDvkzWXM0IkWcfub0FlrYk5BRHXvnnbfYc1UMDhtYPR6NoZ0cIZ9G7ARBcXOmQNzigvGoroi9bCPY0vf882ImftCvhZpT5VFM7i5q4UgGvFOQJcUZVYjA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790795297; c=relaxed/simple; bh=ErI8fAeKSQK+WiJuNOVYVLhi/JU0ASWZaDEVfI1CgSE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=m/f+rQxqVyuAsBRg3O4N8v+ZP8eI3Kxaksu3CIP4OcJAgLqZ76EI6B9kYDRLyL/cOQ7AtuSo8fcuXRZTjVmwZ11fa9IY5KsEFuTGgLtnZ9fc16zCK6KDkrARmDzxf6te6g4+Dd1FXCTgnENr/WNGm9KiL+H+QqKRFDZuP00L6ok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=hNIM8Alh; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="hNIM8Alh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C29241F000FF; Wed, 30 Sep 2026 19:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790795296; bh=zQBrI9H5c5DSMHsC+I0ClKWxuk4ez/eSfCR9nKYZOGo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hNIM8AlhLzjj+upEguttDzx0o2i9xv2FTaKgIJCfvp6U2AD+wnjBAk55siHdtucvF OW4NblD2IB/z3LPvZMG19mZptZiPrUbTKyxWtHmIVeP6CtfwOrVCmy2BKHJ1dSQ8EY lQhlx5U0BkGz4zopgNxHOqjSMSAi0i9ieI/XgzH4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Vega , =?UTF-8?q?Toke=20H=C3=B8iland-J=C3=B8rgensen?= , Victor Nogueira , Jamal Hadi Salim , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 0510/1193] net/sched: pie: clamp psched_mtu in pie_drop_early Date: Wed, 30 Sep 2026 17:19:54 +0200 Message-ID: <20260930152445.497314005@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Jamal Hadi Salim [ Upstream commit 54370e44c002770ae61fc889f28f699e91616ffc ] pie_drop_early() calls psched_mtu() with no clamp. With mtu=0x80000000 the bytemode divide silently zeroes the drop probability, disabling AQM. Clamp to [1, 1<<20]. Conditions to recreate the bug: CONFIG_NET_SCH_PIE=y. Requires CAP_NET_ADMIN (namespace-local via unshare -Urn suffices). tc qdisc add dev dummy0 root pie tc qdisc change dev dummy0 root pie stab data 32768 size_log 15 cell_log 0 Fixes: d4b36210c2e6 ("net: pkt_sched: PIE AQM scheme") Reported-by: Vega Reviewed-by: Toke Høiland-Jørgensen Tested-by: Victor Nogueira Signed-off-by: Jamal Hadi Salim Link: https://patch.msgid.link/QDISC-0CFC.v3.20260901204856@mojatatu.com.7 Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- net/sched/sch_pie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 6ca4dd77a29c7..fba806f0acd47 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -35,7 +35,7 @@ bool pie_drop_early(struct Qdisc *sch, struct pie_params *params, { u64 rnd; u64 local_prob = vars->prob; - u32 mtu = psched_mtu(qdisc_dev(sch)); + u32 mtu = clamp_t(u32, psched_mtu(qdisc_dev(sch)), 1, 1 << 20); /* If there is still burst allowance left skip random early drop */ if (vars->burst_time > 0) -- 2.53.0