Re: [PATCH net v6] rust: net: netlink: validate attribute length before casting to `c_int`
From: patchwork-bot+netdevbpf
Date: Tue Sep 29 2026 - 07:02:07 EST
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:
On Fri, 25 Sep 2026 08:55:04 +0000 you wrote:
> `put()` trusted an unchecked `as` cast from `usize` to `c_int`.
> When the length exceeds `i32::MAX` that cast wraps around to a
> negative value.
>
> This ultimately resulted in a kernel panic when the reinterpreted
> value via `__nla_reserve()` and `skb_put()` became enormous.
>
> [...]
Here is the summary with links:
- [net,v6] rust: net: netlink: validate attribute length before casting to `c_int`
https://git.kernel.org/netdev/net/c/0923198be4ae
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html