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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9cf7982c-ec8a-4af9-98a8-549cd87dca70@iogearbox.net>
Date: Thu, 31 Aug 2023 14:09:05 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Xu Kuohai <xukuohai@...weicloud.com>, bpf@...r.kernel.org,
 netdev@...r.kernel.org
Cc: Bobby Eshleman <bobby.eshleman@...edance.com>
Subject: Re: [PATCH bpf-next] selftests/bpf: fix a CI failure caused by vsock
 write

On 8/31/23 3:31 AM, Xu Kuohai wrote:
> From: Xu Kuohai <xukuohai@...wei.com>
> 
> While commit 90f0074cd9f9 ("selftests/bpf: fix a CI failure caused by vsock sockmap test")
> fixes a receive failure of vsock sockmap test, there is still a write failure:
> 
> Error: #211/79 sockmap_listen/sockmap VSOCK test_vsock_redir
> Error: #211/79 sockmap_listen/sockmap VSOCK test_vsock_redir
>    ./test_progs:vsock_unix_redir_connectible:1501: egress: write: Transport endpoint is not connected
>    vsock_unix_redir_connectible:FAIL:1501
>    ./test_progs:vsock_unix_redir_connectible:1501: ingress: write: Transport endpoint is not connected
>    vsock_unix_redir_connectible:FAIL:1501
>    ./test_progs:vsock_unix_redir_connectible:1501: egress: write: Transport endpoint is not connected
>    vsock_unix_redir_connectible:FAIL:1501
> 
> The reason is that the vsock connection in the test is set to ESTABLISHED state
> by function virtio_transport_recv_pkt, which is executed in a workqueue thread,
> so when the user space test thread runs before the workqueue thread, this
> problem occurs.
> 
> To fix it, before writing the connection, wait for it to be connected.
> 
> Fixes: d61bd8c1fd02 ("selftests/bpf: add a test case for vsock sockmap")
> Signed-off-by: Xu Kuohai <xukuohai@...wei.com>

Thanks for the fix! Looks like this is gone now at least in the tests which succeed,
but there are still two issues:

1) s390x fails in BPF CI as below:

https://github.com/kernel-patches/bpf/actions/runs/6031993528/job/16366784236

Error: #211 sockmap_listen
Error: #211/79 sockmap_listen/sockmap VSOCK test_vsock_redir
   Error: #211/79 sockmap_listen/sockmap VSOCK test_vsock_redir
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
Error: #211/158 sockmap_listen/sockhash VSOCK test_vsock_redir
   Error: #211/158 sockmap_listen/sockhash VSOCK test_vsock_redir
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494
   ./test_progs:vsock_socketpair_connectible:1456: poll_connect: Invalid argument
   vsock_socketpair_connectible:FAIL:1456
   ./test_progs:vsock_unix_redir_connectible:1494: vsock_socketpair_connectible() failed
   vsock_unix_redir_connectible:FAIL:1494

2) Various panics, some GPFs but also seen NULL pointer derefs, discussed in the other
    thread: https://lore.kernel.org/bpf/ZO+RQwJhPhYcNGAi@krava/

I believe issue 1) might still be related to your fix in here, ptal.

Thanks,
Daniel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ