[Devel] [PATCH hci-8.2 v2 11/15] ms/bpf: Fix out-of-bounds read of sk_protocol in bpf_sock_destroy()
no-reply at sashiko.virtuozzo.com
no-reply at sashiko.virtuozzo.com
Tue Dec 1 18:43:14 MSK 2026
> From: Jiayuan Chen <jiayuan.chen at linux.dev>
>
> [ Upstream commit 01b245ba016d44861690594e10f67e026ce8552f ]
>
> sk_protocol lives in struct sock, not in struct sock_common. A timewait
> or request sock handed to bpf_sock_destroy() by the tcp iterator is
> neither, so reading sk->sk_protocol runs past the object:
>
> ==================================================================
> BUG: KASAN: slab-out-of-bounds in bpf_sock_destroy+0xc7/0xe0
> Read of size 2 at addr ffff8881047d11b4 by task test_progs/428
>
> Tainted: [W]=WARN
> Call Trace:
> <TASK>
> [ ... ]
>
> https://virtuozzo.atlassian.net/browse/VSTOR-158161
> Feature: fix ms/net
>
> Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Sashiko has reviewed this patch and found no issues.
Carry the trailer below into the next revision and Sashiko will not review this patch again.
Reviewed-by: Sashiko <no-reply at sashiko.virtuozzo.com>
--
Sashiko AI review · https://sashiko.vzint.dev/#/patchset/20261201153749.2872789-1-eva.kurchatova@virtuozzo.com?part=11
More information about the Devel
mailing list