[lvc-project] [PATCH net v2] net: octeontx2-pf: Fix UB in shift operation
patchwork-bot+netdevbpf at kernel.org
patchwork-bot+netdevbpf at kernel.org
Thu Aug 6 16:20:05 MSK 2026
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni at redhat.com>:
On Tue, 4 Aug 2026 15:04:48 +0300 you wrote:
> From: "Sergey V. Frolov" <Sergey.V.Frolov at kaspersky.com>
>
> In function otx2_get_egress_burst_cfg, when the parameter `burst` is
> 255 and the max mantissa is 255 (0xFFULL), `burst_exp` is set to
> `ilog2(255) - 1`, which equals 6.
>
> This results in an unsigned wrap-around when calculating
> `(1ULL << (*burst_exp - 7))`, since `*burst_exp - 7` becomes -1,
> which makes the shift operand 0xFFFFFFFF. This value is greater than
> the width of the left operand.
>
> [...]
Here is the summary with links:
- [net,v2] net: octeontx2-pf: Fix UB in shift operation
https://git.kernel.org/netdev/net/c/7e2d693af0d4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the lvc-project
mailing list