From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.3 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, FREEMAIL_REPLYTO_END_DIGIT,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7802CC3A59D for ; Fri, 16 Aug 2019 11:34:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 504232133F for ; Fri, 16 Aug 2019 11:34:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=protonmail.ch header.i=@protonmail.ch header.b="JmfR8i9m" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727128AbfHPLeI (ORCPT ); Fri, 16 Aug 2019 07:34:08 -0400 Received: from mail-40135.protonmail.ch ([185.70.40.135]:20621 "EHLO mail-40135.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727007AbfHPLeI (ORCPT ); Fri, 16 Aug 2019 07:34:08 -0400 Date: Fri, 16 Aug 2019 11:33:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=default; t=1565955243; bh=Yt+i7vUoMC/7exz+6N1Qfx1ezQKcdB81VEBD2vgd94g=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References: Feedback-ID:From; b=JmfR8i9mQ9pd0Isp+wfbro4gkLogIvJHS8cTAdzkbaV0V+HlbX6D6OpI/mFq6ZKRr BnYyvP++4dMxYJXBJ0BS4WyODhCoXNaDmmjS30Fk8oK9nfI2N0WtXgZwkPEFKhlRoa Iecmj9CBu2xx+2z/NT9Ktm2V5NKOGsR7u29tEdh8= To: Thomas Gleixner From: Jordan Glover Cc: Alexei Starovoitov , Andy Lutomirski , Daniel Colascione , Song Liu , Kees Cook , Networking , bpf , Alexei Starovoitov , Daniel Borkmann , Kernel Team , Lorenz Bauer , Jann Horn , Greg KH , Linux API , LSM List Reply-To: Jordan Glover Subject: Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf Message-ID: In-Reply-To: References: <20190806011134.p5baub5l3t5fkmou@ast-mbp> <20190814220545.co5pucyo5jk3weiv@ast-mbp.dhcp.thefacebook.com> <20190815172856.yoqvgu2yfrgbkowu@ast-mbp.dhcp.thefacebook.com> <20190815230808.2o2qe7a72cwdce2m@ast-mbp.dhcp.thefacebook.com> Feedback-ID: QEdvdaLhFJaqnofhWA-dldGwsuoeDdDw7vz0UPs8r8sanA3bIt8zJdf4aDqYKSy4gJuZ0WvFYJtvq21y6ge_uQ==:Ext:ProtonMail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: On Friday, August 16, 2019 9:59 AM, Thomas Gleixner wr= ote: > On Fri, 16 Aug 2019, Jordan Glover wrote: > > > "systemd --user" service? Trying to do so will fail with: > > "Failed to apply ambient capabilities (before UID change): Operation no= t permitted" > > I think it's crucial to clear that point to avoid confusion in this dis= cussion > > where people are talking about different things. > > On the other hand running "systemd --system" service with: > > User=3Dnobody > > AmbientCapabilities=3DCAP_NET_ADMIN > > is perfectly legit and clears some security concerns as only privileged= user > > can start such service. > > While we are at it, can we please stop looking at this from a systemd onl= y > perspective. There is a world outside of systemd. > > Thanks, > > tglx If you define: "systemd --user" =3D=3D unprivileged process started by unprivileged user "systemd --system" =3D=3D process started by privileged user but run as ano= ther user which keeps some of parent user privileges and drops others you can get rid of "systemd" from the equation. "systemd --user" was the example provided by Alexei when asked about the us= ecase but his description didn't match what it does so it's not obvious what the = real usecase is. I'm sure there can be many more examples and systemd isn't impo= rtant here in particular beside to understand this specific example. Jordan