Re: [PATCH net v2] dpaa2-switch: validate num_ifs to prevent out-of-bounds write
From: patchwork-bot+netdevbpf
Date: Thu Feb 26 2026 - 06:56:27 EST
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@xxxxxxxxxx>:
On Tue, 24 Feb 2026 19:05:56 +0800 you wrote:
> The driver obtains sw_attr.num_ifs from firmware via dpsw_get_attributes()
> but never validates it against DPSW_MAX_IF (64). This value controls
> iteration in dpaa2_switch_fdb_get_flood_cfg(), which writes port indices
> into the fixed-size cfg->if_id[DPSW_MAX_IF] array. When firmware reports
> num_ifs >= 64, the loop can write past the array bounds.
>
> Add a bound check for num_ifs in dpaa2_switch_init().
>
> [...]
Here is the summary with links:
- [net,v2] dpaa2-switch: validate num_ifs to prevent out-of-bounds write
https://git.kernel.org/netdev/net/c/8a5752c6dcc0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html