Re: [PATCH net] tls: avoid field-spanning write when copying crypto info

From: patchwork-bot+netdevbpf

Date: Fri Oct 23 2026 - 19:10:41 EST


Hello:

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

On Wed, 21 Oct 2026 09:32:33 +0200 you wrote:
> do_tls_setsockopt_conf() copies the cipher-specific part of the crypto
> info to crypto_info + 1, where crypto_info points at the 4-byte info
> member of union tls_crypto_context. When optval is a kernel sockptr,
> copy_from_sockptr_offset() is a memcpy(), and FORTIFY_SOURCE bounds the
> destination by that member:
>
> [ 6.948348] memcpy: detected field-spanning write (size 52) of single field "dst" at include/linux/sockptr.h:49 (size 0)
> [ 6.948480] WARNING: include/linux/sockptr.h:49 at tls_setsockopt+0x9b2/0xa30, CPU#1: init/1
> [ 7.001355] Call Trace:
> [ 7.003146] do_sock_setsockopt+0xb0/0x190
> [ 7.003975] __sys_setsockopt+0x76/0xc0
> [ 7.005368] do_syscall_64+0xda/0x4b0
>
> [...]

Here is the summary with links:
- [net] tls: avoid field-spanning write when copying crypto info
https://git.kernel.org/netdev/net/c/c43c1c24f3cd

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