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  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, 21 May 2020 04:50:32 +0200
From:   Jann Horn <>
To:     Andrii Nakryiko <>
Cc:     bpf <>,
        Network Development <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Andrii Nakryiko <>,
        Kernel Team <>
Subject: Re: [PATCH bpf] bpf: prevent mmap()'ing read-only maps as writable

On Tue, May 19, 2020 at 7:38 AM Andrii Nakryiko <> wrote:
> As discussed in [0], it's dangerous to allow mapping BPF map, that's meant to
> be frozen and is read-only on BPF program side, because that allows user-space
> to actually store a writable view to the page even after it is frozen. This is
> exacerbated by BPF verifier making a strong assumption that contents of such
> frozen map will remain unchanged. To prevent this, disallow mapping
> BPF_F_RDONLY_PROG mmap()'able BPF maps as writable, ever.
>   [0]
> Suggested-by: Jann Horn <>
> Fixes: fc9702273e2e ("bpf: Add mmap() support for BPF_MAP_TYPE_ARRAY")
> Signed-off-by: Andrii Nakryiko <>

Reviewed-by: Jann Horn <>

Powered by blists - more mailing lists