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: <CAEf4BzaVAH9+y2m7p-GZk2hx+P_WdyLcku4evOKCeudNYrRd5Q@mail.gmail.com>
Date:   Tue, 11 Feb 2020 16:40:28 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Martin KaFai Lau <kafai@...com>
Cc:     bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        David Miller <davem@...emloft.net>,
        Kernel Team <kernel-team@...com>,
        Networking <netdev@...r.kernel.org>
Subject: Re: [PATCH bpf] bpf: selftests: Fix error checking on reading the
 tcp_fastopen sysctl

On Tue, Feb 11, 2020 at 1:32 PM Martin KaFai Lau <kafai@...com> wrote:
>
> There is a typo in checking the "saved_tcp_fo" and instead
> "saved_tcp_syncookie" is checked again.  This patch fixes it
> and also breaks them into separate if statements such that
> the test will abort asap.
>
> Reported-by: David Binderman <dcb314@...mail.com>
> Signed-off-by: Martin KaFai Lau <kafai@...com>
> ---

Acked-by: Andrii Nakryiko <andriin@...com>

>  tools/testing/selftests/bpf/prog_tests/select_reuseport.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> index 098bcae5f827..b577666d028e 100644
> --- a/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> +++ b/tools/testing/selftests/bpf/prog_tests/select_reuseport.c
> @@ -822,8 +822,10 @@ void test_select_reuseport(void)
>                 goto out;
>
>         saved_tcp_fo = read_int_sysctl(TCP_FO_SYSCTL);
> +       if (saved_tcp_fo < 0)
> +               goto out;
>         saved_tcp_syncookie = read_int_sysctl(TCP_SYNCOOKIE_SYSCTL);
> -       if (saved_tcp_syncookie < 0 || saved_tcp_syncookie < 0)
> +       if (saved_tcp_syncookie < 0)
>                 goto out;
>
>         if (enable_fastopen())
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ