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=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_PASS autolearn=unavailable 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 E3E52C04A6B for ; Sun, 12 May 2019 10:51:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B47FB20C01 for ; Sun, 12 May 2019 10:51:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557658270; bh=YBMHdCN5YlmAEwYJnIWMC90f2fh1HucmevIcoGnC4d0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=qUkNch28AGi/OT2YcBnLWlN9MQHuu83KYPqryt1xA1g9LzVZ3ikq1K0Y0o+Tc0E1l AXmrGPnigKcK49MN/RBQpfesR75YMQ4wRZp88xZKvbutEAaSMNhUJRnyWGHNYYy2aD yUUOQe2aVtwBioe8zA0KgLp1G0fxXHnQEm6mu3o0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbfELKvJ (ORCPT ); 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-Google-Smtp-Source: APXvYqwcPvj2z+tEM66MYXyt5p+KRDOOf+EgVgfzsZ1/K+Kq1eA0LN9vE+o+ZBubeJZRbBILqHrw1w== 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