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]
Date:   Thu, 11 Jul 2019 16:50:32 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Paolo Pisati <p.pisati@...il.com>
Cc:     "--in-reply-to=" <20190710231439.GD32439@...silo.jf.intel.com>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        "David S . Miller" <davem@...emloft.net>,
        Shuah Khan <shuah@...nel.org>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Jiong Wang <jiong.wang@...ronome.com>,
        Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/2] Fold checksum at the end of bpf_csum_diff and fix

On Thu, Jul 11, 2019 at 2:32 AM Paolo Pisati <p.pisati@...il.com> wrote:
>
> From: Paolo Pisati <paolo.pisati@...onical.com>
>
> After applying patch 0001, all checksum implementations i could test (x86-64, arm64 and
> arm), now agree on the return value.
>
> Patch 0002 fix the expected return value for test #13: i did the calculation manually,
> and it correspond.
>
> Unfortunately, after applying patch 0001, other test cases now fail in
> test_verifier:
>
> $ sudo ./tools/testing/selftests/bpf/test_verifier
> ...
> #417/p helper access to variable memory: size = 0 allowed on NULL (ARG_PTR_TO_MEM_OR_NULL) FAIL retval 65535 != 0
> #419/p helper access to variable memory: size = 0 allowed on != NULL stack pointer (ARG_PTR_TO_MEM_OR_NULL) FAIL retval 65535 != 0
> #423/p helper access to variable memory: size possible = 0 allowed on != NULL packet pointer (ARG_PTR_TO_MEM_OR_NULL) FAIL retval 65535 != 0

I'm not entirely sure this fix is correct, given these failures, to be honest.

Let's wait for someone who understands intended semantics for
bpf_csum_diff, before changing returned value so drastically.

But in any case, fixes for these test failures should be in your patch
series as well.


> ...
> Summary: 1500 PASSED, 0 SKIPPED, 3 FAILED
>
> And there are probably other fallouts in other selftests - someone familiar
> should take a look before applying these patches.
>
> Paolo Pisati (2):
>   bpf: bpf_csum_diff: fold the checksum before returning the
>     value
>   bpf, selftest: fix checksum value for test #13
>
>  net/core/filter.c                                   | 2 +-
>  tools/testing/selftests/bpf/verifier/array_access.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.17.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ