From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mail.toke.dk; dkim=none; arc=none (Message is not ARC signed); dmarc=fail (Used From Domain Record) header.from=toke.dk policy.dmarc=none From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Samuel Moelius Cc: Samuel Moelius , Jamal Hadi Salim , Jiri Pirko , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , "moderated list:CAKE QDISC" , "open list:TC subsystem" , open list In-Reply-To: <20260609232935.1602659.8545fdb04fbe.cake-overhead-underflow@trailofbits.com> References: <20260609232935.1602659.8545fdb04fbe.cake-overhead-underflow@trailofbits.com> Date: Wed, 10 Jun 2026 10:06:04 +0200 X-Clacks-Overhead: GNU Terry Pratchett Message-ID: <877bo6akgj.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: VMV37GKABAJOHUTOG5RK3C5CEFIK6PT6 X-Message-ID-Hash: VMV37GKABAJOHUTOG5RK3C5CEFIK6PT6 X-MailFrom: toke@toke.dk X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list Subject: [Cake] Re: [PATCH net v2] net/sched: cake: reject overhead values that underflow length List-Id: Cake - FQ_codel the next generation Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Samuel Moelius writes: > CAKE accepts overhead values that can make adjusted packet length > arithmetic underflow. A negative effective length can wrap through > unsigned arithmetic and become a large value. > > Such configurations make rate accounting depend on integer wraparound > rather than on the packet size userspace intended to model. > > Validate overhead settings before using them in adjusted length > calculations. > > Fixes: a729b7f0bd5b ("sch_cake: Add overhead compensation support to the = rate shaper") > Assisted-by: Codex:gpt-5.5-cyber-preview > Signed-off-by: Samuel Moelius Acked-by: Toke H=C3=B8iland-J=C3=B8rgensen