lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 27 Oct 2023 20:42:38 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Yonghong Song <yonghong.song@...ux.dev>
Cc: bpf@...r.kernel.org, netdev@...r.kernel.org, 
	Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>, 
	Daniel Borkmann <daniel@...earbox.net>, kernel-team@...com, 
	Martin KaFai Lau <martin.lau@...nel.org>
Subject: Re: [PATCH net-next] net: bpf: Use sockopt_lock_sock() in ip_sock_set_tos()

On Fri, Oct 27, 2023 at 8:24 PM Yonghong Song <yonghong.song@...ux.dev> wrote:
>
> With latest sync from net-next tree, bpf-next has a bpf selftest failure:
>   [root@...h-fb-vm1 bpf]# ./test_progs -t setget_sockopt
>   ...
>   [   76.194349] ============================================
>   ...
>
> Both ip_sock_set_tos() and inet_listen() calls lock_sock(sk) which
> caused a dead lock.
>
> To fix the issue, use sockopt_lock_sock() in ip_sock_set_tos()
> instead. sockopt_lock_sock() will avoid lock_sock() if it is in bpf
> context.
>
> Fixes: 878d951c6712 ("inet: lock the socket in ip_sock_set_tos()")
> Cc: Eric Dumazet <edumazet@...gle.com>
> Suggested-by: Martin KaFai Lau <martin.lau@...nel.org>
> Signed-off-by: Yonghong Song <yonghong.song@...ux.dev>
> ---

SGTM, thanks.

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ