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] [day] [month] [year] [list]
Message-ID: <CAADnVQKAeP3RB_F-isOdRJNaKns5RBEfs1aYw=_fCtBro64Amw@mail.gmail.com>
Date:   Tue, 1 Feb 2022 12:25:41 -0800
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Jakub Sitnicki <jakub@...udflare.com>
Cc:     He Fengqing <hefengqing@...wei.com>,
        Marek Majkowski <marek@...udflare.com>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>
Subject: Re: [bpf-next] bpf: Add CAP_NET_ADMIN for sk_lookup program type

On Sun, Jan 30, 2022 at 4:25 AM Jakub Sitnicki <jakub@...udflare.com> wrote:
>
> On Sun, Jan 30, 2022 at 04:24 AM CET, Alexei Starovoitov wrote:
> > On Sat, Jan 29, 2022 at 6:16 PM He Fengqing <hefengqing@...wei.com> wrote:
> >>
> >> SK_LOOKUP program type was introduced in commit e9ddbb7707ff
> >> ("bpf: Introduce SK_LOOKUP program type with a dedicated attach point"),
> >> but the commit did not add SK_LOOKUP program type in net admin prog type.
> >> I think SK_LOOKUP program type should need CAP_NET_ADMIN, so add SK_LOOKUP
> >> program type in net_admin_prog_type.
> >
> > I'm afraid it's too late to change.
> >
> > Jakub, Marek, wdyt?
>
> That's definitely an oversight on my side, considering that CAP_BPF came
> in 5.8, and sk_lookup program first appeared in 5.9.
>
> Today it's possible to build a usable sk_lookup program without
> CAP_NET_ADMIN if you go for REUSEPORT_SOCKARRAY map instead of
> SOCKMAP/HASH.
>
> Best I can come up is a "phase it out" approach. Put the CAP_NET_ADMIN
> load-time check behind a config option, defaulting to true?, and wait
> for it to become obsolete.

I would keep it as-is then. The trouble doesn't feel worth it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ