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: <CAADnVQKDaMAVT6UxGy8w+CPUmzvgVWAjXmHexiz09yZJ8CbAeQ@mail.gmail.com>
Date:   Fri, 18 Oct 2019 16:25:24 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Toke Høiland-Jørgensen <toke@...hat.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...com>, bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        Jakub Kicinski <kubakici@...pl>, Yonghong Song <yhs@...com>
Subject: Re: [PATCH bpf] xdp: Prevent overflow in devmap_hash cost calculation
 for 32-bit builds

On Fri, Oct 18, 2019 at 8:36 AM Toke Høiland-Jørgensen <toke@...hat.com> wrote:
>
> Tetsuo pointed out that without an explicit cast, the cost calculation for
> devmap_hash type maps could overflow on 32-bit builds. This adds the
> missing cast.
>
> Fixes: 6f9d451ab1a3 ("xdp: Add devmap_hash map type for looking up devices by hashed index")
> Reported-by: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>

gmail delivery lags by a day :(
I applied this patch along with Yonghong's ack to bpf tree
(though I don't have it in my mail box, but it's there in patchworks).

I'm not sure that cleanup Jakub is proposing is possible or better.
Not everything is array_size here and in other places
where cost is computed. u64 is imo much cleaner.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ