Re: [PATCH net-next v3] net/sched: cls_flow: avoid integer overflow in perturb_period

From: patchwork-bot+netdevbpf

Date: Thu Nov 19 2026 - 06:00:16 EST


Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:

On Fri, 13 Nov 2026 10:48:02 +0800 you wrote:
> flow_change() calculates perturb_period by directly multiplying
> nla_get_u32(tb[TCA_FLOW_PERTURB]) by HZ, without any overflow
> protection. Since perturb_period is a u32, the multiplication
> overflows when the value from netlink exceeds UINT_MAX / HZ.
> The result can be an unexpectedly short period or even zero.
>
> # tc qdisc add dev lo clsact
> # tc filter add dev lo ingress protocol ip pref 1 handle 1 flow \
> hash keys src perturb 42949673 baseclass 1:10
>
> [...]

Here is the summary with links:
- [net-next,v3] net/sched: cls_flow: avoid integer overflow in perturb_period
https://git.kernel.org/netdev/net-next/c/042ca0604cbb

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html