[PATCH net v4] cipso: fix optlen corruption in cipso_v4_delopt()
patchwork-bot+netdevbpf at kernel.org
patchwork-bot+netdevbpf at kernel.org
Mon Nov 2 13:00:04 UTC 2026
Hello:
This patch was applied to netdev/net.git (main)
by Dave Miller <davem at davem-thinkpadp1gen8.ibmlond.csb>:
On Thu, 29 Oct 2026 11:39:42 +0800 you wrote:
> cipso_v4_delopt() recomputes the option length by walking the option
> buffer after the CIPSO option has been moved out. The walk then reads
> the stale bytes at the tail of the buffer as option data, and a crafted
> setsockopt(IP_OPTIONS) buffer can make it treat one of them as an option
> length, increasing opt->opt.optlen beyond the valid option data.
>
> The corrupted length stays on the socket and is later used as the copy
> length by getsockopt(IP_OPTIONS) and by the udp/raw/ping sendmsg paths,
> where it exceeds the size of the buffers they copy into.
>
> [...]
Here is the summary with links:
- [net,v4] cipso: fix optlen corruption in cipso_v4_delopt()
https://git.kernel.org/netdev/net/c/1f1f8e8c5176
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
More information about the Linux-security-module-archive
mailing list