Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4044084yba; Sun, 12 May 2019 03:52:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX3X8eQXsKKIgXLMIqSTtY62Tyo/uYQP9USVUkjX1MI1CwLTylkd8Ld5UjP/5L+QTi00EX X-Received: by 2002:a63:da14:: with SMTP id c20mr25111368pgh.191.1557658356485; Sun, 12 May 2019 03:52:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557658356; cv=none; d=google.com; s=arc-20160816; b=gKwkvzdeCVVZeKqgrZaiSOU8Kv/caIUd5aSHV7jJPH57a3tI/aDmNV9flF+p4b2M84 Cn87eQ7Gh6O8fexmdk06rDSTNgVaJjKwZoVL+jzr/TkjbAb7QPkOu1YVqMIzxGgY1D9a HAunvIE21/KRn/MjJL+Q4IMF/gcGzXu8wduBj6VMH+iFYOBd1h6g9LyEhcXFZlSUd+81 sy+VASboEZECrx6oGASHqj5bPzr9UW4/4b3a5139CDVdPFkvUzkg6XPDQ1gBBcRssdZE +0VMYY5ILAV6Cd3VBortjkHmPu7GjOooNhXaktZRWXKbDKdHim0Xp+/ax/GU3D2JHx6V 5XLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=EBbnEnlSGI+YZhytxcBPyDwhUUf9hqUjJsyebbdCrcw=; b=wP4PE0x0copsSnbSF03QGKi2o19bgU8YQRWEpWVWca9HjmOW5oG135sK+8ks+yS2/F PhuplUjhvBeIHICsltDorjbuV/RvQGtbgpX7PKLSK8kLM56QqXxFFEYoZONsUQwWV6Hh bFROuUgYJA3i8bmaJfycsQRiOaZt7knhq038RxKvZhFW7VwENs8m3TDjt3RcMiCgJn+r TZJEm40iLSaRcBuIEzmAy2B+227PqHfKrBPIF1oqfjtxber09XlnG7Y2SH5/klDj/w7V j9Xr088mp2Ox/ueeNs1KWaTSSXjrvDcIGvVTykUkfiKTUHMlKbe6X29Z/kzQVVS9cTyK 2hvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Bwee6W/a"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g15si14322430pfg.284.2019.05.12.03.52.20; Sun, 12 May 2019 03:52:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="Bwee6W/a"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726672AbfELKvJ (ORCPT + 99 others); Sun, 12 May 2019 06:51:09 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:35882 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726375AbfELKvJ (ORCPT ); Sun, 12 May 2019 06:51:09 -0400 Received: by mail-lj1-f193.google.com with SMTP id z1so8510999ljb.3 for ; Sun, 12 May 2019 03:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EBbnEnlSGI+YZhytxcBPyDwhUUf9hqUjJsyebbdCrcw=; b=Bwee6W/aqjF3RtU9Pd++GRfF0phoAIMfmTwaL+3Nu8NDs6Et4DPm/F1C0PX7+IyOUI fj41FT6ceV5M+P7SetVJPMyYDB7uFUcFKruvefh1bd2kvdataPMuobAmTp0v5Vb33/n5 WE2FQvUPk2ZhdYv1biJYsS7ilv3mBt2dX5GKU= 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=EBbnEnlSGI+YZhytxcBPyDwhUUf9hqUjJsyebbdCrcw=; b=E1gtHE97UI/btrCJ0ZlD8+Gx/H29+e23a835VCV0VqN7sQjdJoD6J+B7ayV6JrIhXh symnBoAWSzwceMhRHsr4d8+xHpaHE/cx2qe6CsF6q5YUGav5pBCEZtLvbKdsfS+3qOtD moJxEcH4jjwCBcxz2/Xk2Lsn4Gp5B3Xa1UUkUEkEVGHq3RQveUZGsOOlyXpQerGu7nlv TBkf7udEKTHIDBo1PGU9KDWsJxzrxWo4HQHOIOGEXCufjC0R02TZcQjCq7YAp1239zUQ ZTR2MpGyRxOH2IDQPGOCmaJ8sw/swXkDSE6uu1dHSW0HuNTA6CYmbqUuDrVmaovJluPi i0mQ== X-Gm-Message-State: APjAAAUBQywZPdRtwZjMALhw9MsGrKrFMXt/OmGvKxHESc9WPPgBEpto 6HlTblr2pYnisTz8lMKbIBYqK2K0EJU= X-Received: by 2002:a2e:980f:: with SMTP id a15mr10767269ljj.131.1557658266499; Sun, 12 May 2019 03:51:06 -0700 (PDT) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com. [209.85.167.50]) by smtp.gmail.com with ESMTPSA id k10sm2536822ljh.86.2019.05.12.03.51.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 May 2019 03:51:06 -0700 (PDT) Received: by mail-lf1-f50.google.com with SMTP id y19so6995169lfy.5 for ; Sun, 12 May 2019 03:51:06 -0700 (PDT) X-Received: by 2002:a19:ca02:: with SMTP id a2mr10604583lfg.88.1557657862375; Sun, 12 May 2019 03:44:22 -0700 (PDT) MIME-Version: 1.0 References: <20190506165439.9155-1-cyphar@cyphar.com> <20190506165439.9155-6-cyphar@cyphar.com> <20190506191735.nmzf7kwfh7b6e2tf@yavin> <20190510204141.GB253532@google.com> <20190510225527.GA59914@google.com> <9CD2B97D-A6BD-43BE-9040-B410D996A195@amacapital.net> In-Reply-To: <9CD2B97D-A6BD-43BE-9040-B410D996A195@amacapital.net> From: Linus Torvalds Date: Sun, 12 May 2019 06:44:06 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v6 5/6] binfmt_*: scope path resolution of interpreters To: Andy Lutomirski Cc: Andrew Lutomirski , Jann Horn , Aleksa Sarai , Al Viro , Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Eric Biederman , Andrew Morton , Alexei Starovoitov , Kees Cook , Christian Brauner , Tycho Andersen , David Drysdale , Chanho Min , Oleg Nesterov , Aleksa Sarai , Linux Containers , linux-fsdevel , Linux API , kernel list , linux-arch Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, May 11, 2019 at 7:37 PM Andy Lutomirski wrote: > > I bet this will break something that already exists. An execveat() flag to turn off /proc/self/exe would do the trick, though. Thinking more about it, I suspect it is (once again) wrong to let the thing that does the execve() control that bit. Generally, the less we allow people to affect the lifetime and environment of a suid executable, the better off we are. But maybe we could limit /proc/*/exe to at least not honor suid'ness of the target? Or does chrome/runc depend on that too? Linus