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: <96367b1a-4ab5-8f1d-1823-a65ba48fa3cc@cogentembedded.com>
Date:   Sat, 2 Mar 2019 13:11:57 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Daniel Borkmann <daniel@...earbox.net>, ast@...com
Cc:     afabre@...udflare.com, marek@...udflare.com, bpf@...r.kernel.org,
        netdev@...r.kernel.org
Subject: Re: [PATCH bpf] bpf: fix sanitation rewrite in case of non-pointers

Hello!

On 02.03.2019 0:05, Daniel Borkmann wrote:

> Marek reported that he saw an issue with the below snippet in that
> timing measurements where off when loaded as unpriv while results

    Were?

> were reasonable when loaded as privileged:
> 
>      [...]
>      uint64_t a = bpf_ktime_get_ns();
>      uint64_t b = bpf_ktime_get_ns();
>      uint64_t delta = b - a;
>      if ((int64_t)delta > 0) {
>      [...]
> 
> Turns out there is a bug where a corner case is missing in the fix
> d3bd7413e0ca ("bpf: fix sanitation of alu op with pointer / scalar
> type from different paths"), namely fixup_bpf_calls() only checks
> whether aux has a non-zero alu_state, but it also needs to test for
> the case of BPF_ALU_NON_POINTER since in both occasions we need to
> skip the masking rewrite (as there is nothing to mask).
> 
> Fixes: d3bd7413e0ca ("bpf: fix sanitation of alu op with pointer / scalar type from different paths")
> Reported-by: Marek Majkowski <marek@...udflare.com>
> Reported-by: Arthur Fabre <afabre@...udflare.com>
> Signed-off-by: Daniel Borkmann <daniel@...earbox.net>
> Link: https://lore.kernel.org/netdev/CAJPywTJqP34cK20iLM5YmUMz9KXQOdu1-+BZrGMAGgLuBWz7fg@mail.gmail.com/T/
[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ