Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp39888ybk; Tue, 19 May 2020 14:58:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwf2BC/Xdq3kDB+95TLxpnAozWS+jpYU1u9YuZ85UEBQ1oI+kIUMQnbEqXiEsj6lXk19r6o X-Received: by 2002:a17:906:39c3:: with SMTP id i3mr1197807eje.417.1589925486061; Tue, 19 May 2020 14:58:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589925486; cv=none; d=google.com; s=arc-20160816; b=ZWza0hdTm86kOBpRR3GbOF33aiqsEwyf0oCAimacLkdXzE9njswya87me8LEtX3CAw abLcz30kjO583A7AWerP7vTMto1jET9etLSq+e5fBs4cRw6Tn36JE1Oma9IIdMDgPDtB otjbgjMTH2gihnS8lgmyWlJrbSC1g3X1P66YVO1gbtDuVR8JHORYRbzN9rCYNh+ahGyU eAuILW0wJOFUdesA8qioLSbb6Uk/GYOBTJ7PpFKZnv3bzODifu3plGY97Cvyk469/F1T 5w8YwV1mHUP2hKyVaC3uyHN/p30jc7vJcWbF7yiTqDc56RTPPotp+317PQDOlB38h6AX XQPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=AXHGDEKcsJjKOPTlCgs9XONcU2hu7j0lHWKKVgvqbX8=; b=CMJ7bwcvApYTl6bik4R1tV8fYbXpw4HKV3RGflLGVkgUMUYYjoSrtzoSizLLHsEz+v SCFHWGHvFHp1vKTs2MPouMRLLiZqF1F90yVVr3joMluDDvKfpFBtPnknKm9k/1U75Cua jjw0ZmRYovUtvsMB+l6YQ2We5VVE76BsbC3/Lqy+G1jTUVgSxaV3Skp/BuCHSTywr3xH uPjBDDPrMFmG1s8sfUvgjPTVO4DhtiHwKhyLgOcsjpnS0n/9q//aEw4ZdVJR+msI3l8i 9xCs6iRWvYnSuf7ZBRSAJoNt68W2lLNvGaqSi41Zr5S916bnIZcdTabf+t0EROfWYNSN 8B6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kKzJ3E2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si394338edm.397.2020.05.19.14.57.40; Tue, 19 May 2020 14:58:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kKzJ3E2y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726352AbgESVzy (ORCPT + 99 others); Tue, 19 May 2020 17:55:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbgESVzx (ORCPT ); Tue, 19 May 2020 17:55:53 -0400 Received: from mail-pj1-x1041.google.com (mail-pj1-x1041.google.com [IPv6:2607:f8b0:4864:20::1041]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BF51C08C5C2 for ; Tue, 19 May 2020 14:55:52 -0700 (PDT) Received: by mail-pj1-x1041.google.com with SMTP id nu7so262216pjb.0 for ; Tue, 19 May 2020 14:55:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=AXHGDEKcsJjKOPTlCgs9XONcU2hu7j0lHWKKVgvqbX8=; b=kKzJ3E2y7F20KDgtPNfkIGsoFlOgPW0ZUtSNswoJwWn46hmaeGVtf97mTyZ9XKQFBN jNtLbgbwLyzJSnncL0pXFn/jO/oqtPjWPpy3eWv8nx2ozpOQGJp7QCSPtKldOFQ7cXbb yu4LTh1HLTFgYuHY8cmmLJXIQV/x9qPousf3Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=AXHGDEKcsJjKOPTlCgs9XONcU2hu7j0lHWKKVgvqbX8=; b=hKtvYQY+pOTh0d6uwbRQnBkVIjjA6yn+qasbVja9rJQD/FWN4xBl4NFaxBNKthvwPI mB+zxfJfH5DbZJnPdaGxfKwybxLW9ScaSGG3chhs5Ycw9pg2KgLAjbkdg4t+g66vxIge cavbvr4i0aTHzZR3TkATZAGu8cN35wD/wDbOa1sspLmh0GqgU9hKoaOv7/ylOhf7bRPi wiLwnhtbcDFaN2kCpW+LdfRbO9WwJKYqAW+oXUkn9wtvmznowCoFd0QOCC3cm20xIqGE bje4D6K3Zt1faAwgg+zF2tgtl4boAtZgO1oEk4RSddyWv8OvPhpYiY4jtL1+guf2xX61 WtjA== X-Gm-Message-State: AOAM533j4eRuXoQ0rXHc7WZvL7BRpz0b1JRLIRsE2g37VzXub9okeXfl W8Vuh8f/5vfGvLZlMoW4E4Sr6g== X-Received: by 2002:a17:902:be08:: with SMTP id r8mr1506428pls.260.1589925351640; Tue, 19 May 2020 14:55:51 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id c63sm386943pfc.2.2020.05.19.14.55.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 May 2020 14:55:50 -0700 (PDT) Date: Tue, 19 May 2020 14:55:49 -0700 From: Kees Cook To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, Linus Torvalds , Oleg Nesterov , Jann Horn , Greg Ungerer , Rob Landley , Bernd Edlinger , linux-fsdevel@vger.kernel.org, Al Viro , Alexey Dobriyan , Andrew Morton , Casey Schaufler , linux-security-module@vger.kernel.org, James Morris , "Serge E. Hallyn" , Andy Lutomirski Subject: Re: [PATCH v2 0/8] exec: Control flow simplifications Message-ID: <202005191442.515A0ED@keescook> References: <87h7wujhmz.fsf@x220.int.ebiederm.org> <87sgga6ze4.fsf@x220.int.ebiederm.org> <87v9l4zyla.fsf_-_@x220.int.ebiederm.org> <877dx822er.fsf_-_@x220.int.ebiederm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877dx822er.fsf_-_@x220.int.ebiederm.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 18, 2020 at 07:29:00PM -0500, Eric W. Biederman wrote: > arch/alpha/kernel/binfmt_loader.c | 11 +---- > fs/binfmt_elf.c | 4 +- > fs/binfmt_elf_fdpic.c | 4 +- > fs/binfmt_em86.c | 13 +---- > fs/binfmt_misc.c | 69 ++++----------------------- > fs/binfmt_script.c | 82 ++++++++++++++------------------ > fs/exec.c | 97 ++++++++++++++++++++++++++------------ > include/linux/binfmts.h | 36 ++++++-------- > include/linux/lsm_hook_defs.h | 3 +- > include/linux/lsm_hooks.h | 52 +++++++++++--------- > include/linux/security.h | 14 ++++-- > kernel/cred.c | 3 ++ > security/apparmor/domain.c | 7 +-- > security/apparmor/include/domain.h | 2 +- > security/apparmor/lsm.c | 2 +- > security/commoncap.c | 9 ++-- > security/security.c | 9 +++- > security/selinux/hooks.c | 8 ++-- > security/smack/smack_lsm.c | 9 ++-- > security/tomoyo/tomoyo.c | 12 ++--- > 20 files changed, 202 insertions(+), 244 deletions(-) Oh, BTW, heads up on this (trivially but annoyingly) conflicting with the copy_strings_kernel/copy_string/kernel change: https://ozlabs.org/~akpm/mmotm/broken-out/exec-simplify-the-copy_strings_kernel-calling-convention.patch Is it worth pulling that and these into your tree? https://ozlabs.org/~akpm/mmotm/broken-out/exec-open-code-copy_string_kernel.patch https://ozlabs.org/~akpm/mmotm/broken-out/umh-fix-refcount-underflow-in-fork_usermode_blob.patch -- Kees Cook