Re: [PATCH net v4] netlink: fix out-of-bounds bitmap access clearing stale mc groups

From: patchwork-bot+netdevbpf

Date: Mon Oct 26 2026 - 04:20:22 EST


Hello:

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

On Mon, 26 Oct 2026 11:09:28 +0800 you wrote:
> netlink_realloc_groups() sizes nlk->groups to the number of groups
> that exist at bind/ADD_MEMBERSHIP time. When more multicast groups
> are registered later (e.g. a new genl family), existing sockets keep
> their smaller bitmap.
>
> When clearing a multicast group of a departing family,
> __netlink_clear_multicast_users() runs netlink_update_socket_mc() on
> each socket on mc_list, which does test_bit()/__assign_bit() on
> group - 1 with no regard to nlk->ngroups. Skip sockets whose bitmap
> predates the group: such a socket can never have joined it.
>
> [...]

Here is the summary with links:
- [net,v4] netlink: fix out-of-bounds bitmap access clearing stale mc groups
https://git.kernel.org/netdev/net/c/6430fb7f1cc4

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