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=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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 4F588C433E2 for ; Thu, 25 Jun 2020 14:36:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2D38C206B7 for ; Thu, 25 Jun 2020 14:36:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="qpEtAa+6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405389AbgFYOgN (ORCPT ); Thu, 25 Jun 2020 10:36:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405340AbgFYOgM (ORCPT ); Thu, 25 Jun 2020 10:36:12 -0400 Received: from mail-ot1-x343.google.com (mail-ot1-x343.google.com [IPv6:2607:f8b0:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13683C08C5C1; Thu, 25 Jun 2020 07:36:12 -0700 (PDT) Received: by mail-ot1-x343.google.com with SMTP id d4so5463887otk.2; Thu, 25 Jun 2020 07:36:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nc4o8s2QFMoo8VzOOVgiVSwm5a+lLq3YtSuw6jXUPz8=; b=qpEtAa+6Zn6ADEGLEn5ovGYLyyf5vUf9zPHAngSmEVVwAjdkjB85xDnN1ZDxmoVans OY2+7jfSDFDXpBtibVva9x8YfoLpXg+tUUsgAnLNbSXqErP0aJonccNPmJ3Ag/gIy4A8 qn4Q/I+0J2y0ka2sOdhFCLR23u5P5Qu9TWmhayXSw6+EkRyKOKvBRQ4UIILQtz0Uzp3S 9mYalirRS5fuIWw9vG9isjz44Jlp+ZR7hCJqfYdf4EkNtJFpmEJ3wEK8OGs8J/+5X3bV NfB59BY0YFF9p+8HigxCUSDdXUknSGekV33UrG71G28oLH+HCW7u7vpSsC+aNvGM2x6t 3Q8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nc4o8s2QFMoo8VzOOVgiVSwm5a+lLq3YtSuw6jXUPz8=; b=C9Vvrn+Fqa9AM0WyXkKNjJdzOLKAyFA9Q1nNXhOfUY2LqaPQWESDyrkYtVRC7qpmsf JjU1G4/3xgkQiq74oXD19HjeORHLIla+WzEZG0IEieG1DmViP8R6rtikx2vDMdgZLj2k +mcM+g8EAkwqHa08GhhsL+J6IT9cMA3q+YQysDgFFXQFCZ8SQ8/XBCo8D+UBTcr+qVRt n3Q8JUCaZDUFv3vAOwLJgYZlE8l37vQehaksW/o0L28vnEnmZuDW1MHg3t7JwJp4U3dT S2x6IfbxAAgEkUpUz6FRrW3o2cr9TEwcHbMqeinj7MNxtD87H0f5ji2n21brV0+66RTX R4+w== X-Gm-Message-State: AOAM533pdCZnF2TZ8Lwy7srCQWpJnV5301sNQ5nxOQYcJMxfT7QpfSZU bFYgV5CqHSrwD4bSdRnGX+CkDty4r5ZIrngD1GY= X-Google-Smtp-Source: ABdhPJy0EXOiuUChdhAbM4Pj4BJ3TwBkFjyZdVQvy0E+BUhRSKAJxkHo8bjtzlhFUSlPkOUwWYCNxOcE6ZyFyC8kYn0= X-Received: by 2002:a4a:9210:: with SMTP id f16mr12249508ooh.13.1593095771370; Thu, 25 Jun 2020 07:36:11 -0700 (PDT) MIME-Version: 1.0 References: <87ftaxd7ky.fsf@x220.int.ebiederm.org> <20200616015552.isi6j5x732okiky4@ast-mbp.dhcp.thefacebook.com> <87h7v1pskt.fsf@x220.int.ebiederm.org> <20200623183520.5e7fmlt3omwa2lof@ast-mbp.dhcp.thefacebook.com> <87h7v1mx4z.fsf@x220.int.ebiederm.org> <20200623194023.lzl34qt2wndhcehk@ast-mbp.dhcp.thefacebook.com> <878sgck6g0.fsf@x220.int.ebiederm.org> <2f55102e-5d11-5569-8248-13618d517e93@i-love.sakura.ne.jp> <20200625132551.GB3526980@kroah.com> In-Reply-To: From: Stephen Smalley Date: Thu, 25 Jun 2020 10:36:00 -0400 Message-ID: Subject: Re: [RFC][PATCH] net/bpfilter: Remove this broken and apparently unmantained To: Greg Kroah-Hartman Cc: Tetsuo Handa , Alexei Starovoitov , "Eric W. Biederman" , Linus Torvalds , Kees Cook , Andrew Morton , Alexei Starovoitov , David Miller , Al Viro , bpf , linux-fsdevel , Daniel Borkmann , Jakub Kicinski , Masahiro Yamada , Gary Lin , Bruno Meneguele , linux-security-module , Casey Schaufler Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Thu, Jun 25, 2020 at 10:26 AM Stephen Smalley wrote: > > On Thu, Jun 25, 2020 at 9:25 AM Greg Kroah-Hartman > wrote: > > > > On Thu, Jun 25, 2020 at 08:56:10AM -0400, Stephen Smalley wrote: > > > No, because we cannot label the inode based on the program's purpose > > > and therefore cannot configure an automatic transition to a suitable > > > security context for the process, unlike call_usermodehelper(). > > > > Why, what prevents this? Can you not just do that based on the "blob > > address" or signature of it or something like that? Right now you all > > do this based on inode of a random file on a disk, what's the difference > > between a random blob in memory? > > Given some kind of key to identify the blob and look up a suitable > context in policy, I think it would work. We just don't have that > with the current interface. With /bin/kmod and the like, we have a > security xattr assigned to the file when it was created that we can > use as the basis for determining the process security context. Looks like info->cmdline could be used as that key if set; we would just need a LSM hook to permit setting up the inode's security state based on that key. If that were passed to shmem_kernel_file_setup() as the name argument, then that might also help path-based LSMs although it seems potentially ambiguous.