Re: [PATCH net v2] ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST

From: patchwork-bot+netdevbpf

Date: Wed Sep 23 2026 - 21:42:00 EST


Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:

On Mon, 21 Sep 2026 04:40:25 +0000 you wrote:
> In seg6_genl_policy, SEG6_ATTR_DST is defined with .type = NLA_BINARY and
> .len = sizeof(struct in6_addr). For NLA_BINARY, .len only enforces the
> maximum payload length and permits shorter payloads (e.g., 0 bytes).
> When seg6_genl_set_tunsrc() copies sizeof(struct in6_addr) bytes via
> kmemdup(val, sizeof(*val), GFP_KERNEL), a short SEG6_ATTR_DST attribute
> triggers a 16-byte out-of-bounds read past skb->tail into uninitialized
> skb->head memory, which is stored in sdata->tun_src and leaked back to
> userspace via SEG6_CMD_GET_TUNSRC.
>
> [...]

Here is the summary with links:
- [net,v2] ipv6: sr: enforce exact attribute length for SEG6_ATTR_DST
https://git.kernel.org/netdev/net/c/2d959c75c27f

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