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 221545218A2; Thu, 17 Sep 2026 17:25:11 +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=1789665912; cv=none; b=Zq9AEPpmLn0j8KoLlcxBpr3QBwmQQX39xizuQWSHpQXIchSJ2NtWTmryIGASqpUfnoQoQuBa7tlCxuNnkHyCPu15qBD4eWR9DCafxG0+R44+Q1kzpqr9gt4YmVEvE5DE6MUHiJHYAp6tUAIjylvSdTNpv1ISDI7ClcZS2+TvIFg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789665912; c=relaxed/simple; bh=4Sn0Wl2LB1SegPXcIzgl07kIZ85CuTyYmmD65PYsKDY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=IG8rWj8kr5bltyqdO+QKVWcXf3PyBnuCtBeoTjywAIi4ZSPd1yx0oLntZK1EBtxKQDjJnP2nBM0U/m7xGvLBT1Fz1dZEwdl6wc2vyef/5mMU8izovx1+jhls28DW4x5Ts3UA+jVuLvLJeDh9tcNukybfcWEnLJX8AA9CfzlhrOc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gKoyREhb; 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="gKoyREhb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80DB61F000FF; Thu, 17 Sep 2026 17:25:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789665911; bh=A/kr2yJH6yUD+U64EsBIFtdZES9BZmIvrOhkiihPNr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=gKoyREhbW0TQIK3csPtqDvtiG5GFpYXYQT98SvmQnEqwE6qoUo0LFKZmJVht+FYBn VNqM+2SyGE9CmjO5RF3n0zfzR1sQRc+vv89xvIYZ/3kUsh2PN7iKpJJgqvNbqJP4NJ DWFVBEw9tgTLyaWFVna4S95k0T8DqCO7r4pa+j4k= 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.18 0823/1250] net/sched: pie: clamp psched_mtu in pie_drop_early Date: Thu, 17 Sep 2026 16:10:18 +0100 Message-ID: <20260917151614.240237672@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260917151551.901433442@linuxfoundation.org> References: <20260917151551.901433442@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.18-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 40149edecbd5a..b85726b2896e1 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