Re: [PATCH] net: sched: em_ipt: validate hook value from netlink

From: patchwork-bot+netdevbpf

Date: Wed Oct 28 2026 - 07:57:24 EST


Hello:

This patch was applied to netdev/net.git (main)
by Dave Miller <davem@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>:

On Mon, 26 Oct 2026 17:07:17 +0800 you wrote:
> em_ipt_change() accepts the user-provided TCA_EM_IPT_HOOK value
> without validating its range.
>
> The value is later used in check_match() as "1 << im->hook". A hook
> value of 32 or greater causes undefined behavior and may undermine the
> xt match hook-mask validation. The value is also passed to
> nf_hook_state_init() as a hook index.
>
> [...]

Here is the summary with links:
- net: sched: em_ipt: validate hook value from netlink
https://git.kernel.org/netdev/net/c/94cea342e891

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