Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1345734rdb; Wed, 24 Jan 2024 12:06:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFDlxB5NJweMaK3KdEg7RvkCOGFOO4J+2phg4ZbVUdhBpif1wRnJsgUkGV8vwBiB9wY205g X-Received: by 2002:ac2:550f:0:b0:510:1ac1:652a with SMTP id j15-20020ac2550f000000b005101ac1652amr39443lfk.53.1706126804281; Wed, 24 Jan 2024 12:06:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706126804; cv=pass; d=google.com; s=arc-20160816; b=wVcHKjOeKwfxa7cxsSrl0TIWkxQCiUJysDjzjJYQjPR9Y4dx/ofWDitxGSjl+JfJHZ 9BKiwvw8UZO9+oW5mmYILCI9m/VSDPSI4Hyc5to71/tfVkLsfBTdC9Vb/kN9GGcFv94q ZmKnhsxq89ocXpCD9xmAzBph5dIfU45f4UfCY9cqJf7xJM7OAxIokBoUCsFarHDtkNuj sG0lJNL20VKoXACrvq4JvuySYi+PfSyTfZXvUWwMqbT2glq3/bRz36ERMXlLlVqhQPXP h71ysKYGdv565Uo93hcdMhiqaosQPC2bmWmI5cpVLRW1GeOC6OhVaVSIl4cUExqcCJTT TOHg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date :dkim-signature; bh=8Y7koMM394YcEzPAIuYhiOvpOOgnTMayLM5RiqJ5YNw=; fh=+0IdnwBEFIVy3QirTvcmvdMzhNA82ZXnPV2mZ3E8cyY=; b=TxATrh7nazZIqI1KhcRBYtZjBmW6NoLRFHJU43ywWIMN0RD/eWjoyyr0IPNJLeMQJK aTJxzesKW3K8s8bwbU4EW4xKItpO7IaZypWifeoG9OZu88Y/BU0Q/O8xO6tPqivFrxos xWBXzAJQq42uccsJ9Enw/pIM8gPLEeOWJLkYMJuS6TWOqwP64lWlyjlLQyNQ4R0KAW1y qJ4bSAE1R2yGh5IBBX5o+1vivYAGJNCCOS78GsXq+nS7CVodPbecsbRMB/UCgPaitQ0u uMUBPNQufmLZ2+G2e85ON03V1nXDGwm+7WPnTT71SvyB9gY46Eq1c4wTFK9orPnJj3NW VNMg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eqNaNKTg; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-37631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id u19-20020a17090657d300b00a306c2a6452si195774ejr.537.2024.01.24.12.06.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 12:06:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-37631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=eqNaNKTg; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-37631-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-37631-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B63AE1F25AE1 for ; Wed, 24 Jan 2024 20:06:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D3F0134724; Wed, 24 Jan 2024 20:05:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="eqNaNKTg" Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EEE3133426 for ; Wed, 24 Jan 2024 20:05:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706126713; cv=none; b=aYOEJeMK1sp4vVh857dk6Dj8Ue0JWrUi6a2Eg9kAdAw7NjN6P0G/5pMQKZ5SXaEv+lCUaER/MDoMEqDcd7TuUQ0+Y4tsZlHVvGyKEPyfrwTcIu33N6j6Nsx6iZZEV6OswrNjYa32HFNfmcjk/25EY54KUkZbbVd7fu2+5+0CByQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706126713; c=relaxed/simple; bh=hE4dimkg1tvF1dEV9pXga/AdXg9+cmfNncPLB9cwyTw=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=b9RVSCslZWKB26B3CoQ3aNtoXCp92paej2PIOxkW3ImBgB23QuaVf7b+YGLKtJvib63zk/GKHE38yU7g+gOoI2Q3NjYE/+uPFJO2+8JRItpqeMVo8UkHjns5EAeI4dHmu8rE+kjpHglQCh8+Q9lO8uVyWP+qkGA1R+lgWknJMC0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=eqNaNKTg; arc=none smtp.client-ip=209.85.215.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-5cfb81124ecso4304694a12.2 for ; Wed, 24 Jan 2024 12:05:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1706126711; x=1706731511; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=8Y7koMM394YcEzPAIuYhiOvpOOgnTMayLM5RiqJ5YNw=; b=eqNaNKTgXVtwSHCsvnh3+iLwk3OIAi3nqW7xtuT4anY0ElR37/O+oAWOOsdhfvL0q6 QOp2pocVfis3MogCjc1R0OYDSRTwzkAiBQKtuuA37lnUcIvmv2C1cXTjhiNxMC4Acci7 0z4Q4vRQSlcSv+DdXlNx6Ryti7rD+kf+ouqq4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706126711; x=1706731511; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8Y7koMM394YcEzPAIuYhiOvpOOgnTMayLM5RiqJ5YNw=; b=hicKSktC5TpehcS1nUpGIViSOxL0XqncPCWnX4BSplme+mlkBJ32ytxMXdjanVpgeE BwWB0f8F/DZidM5Um4wAhy4KwNveseEEeUVwXo44m2DDzthOBYypFskorLh8uTVVteiC yHGHt6mPXFGKhAXGbmf076/DPRo0Wqs/ZtHHHIMtoDAEEXdFVPLU47uMD182FHBeRpeM lSttm6OsH3jqgaWx7G1V1wwsOt2YJMFyEbDwzQA1T8UsSULsvw6aLjUyUSF57NT1c7D8 8ZJ0F/1aCOg/J5ELnEYmQ1/lvsIVvEZLGy4qaMeT3FxLGQyGamyNXLHwwE+K8wjsHIky 0JnQ== X-Gm-Message-State: AOJu0YyYDEtO7vFTh3sHSdIO2ulmr4sLMJvHzyyWE92md1pVhh/U6olK xCVeHB81if4LXeDdYK5wqSCQe6aMYUGe1vCjw39v/fTBDZzmsyIb9DFPld+tgQ== X-Received: by 2002:a05:6a20:3b1c:b0:19c:32be:628 with SMTP id c28-20020a056a203b1c00b0019c32be0628mr1149240pzh.81.1706126711561; Wed, 24 Jan 2024 12:05:11 -0800 (PST) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id f28-20020aa79d9c000000b006d9a13b491csm14013414pfq.212.2024.01.24.12.05.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 12:05:11 -0800 (PST) Date: Wed, 24 Jan 2024 12:05:10 -0800 From: Kees Cook To: Linus Torvalds Cc: linux-kernel@vger.kernel.org, Alexander Viro , Alexey Dobriyan , Andrew Morton , Askar Safin , Bernd Edlinger , Christian Brauner , Eric Biederman , Jan Kara , Kees Cook , Kentaro Takeda , linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Sebastian Andrzej Siewior , Tetsuo Handa Subject: [GIT PULL] execve fixes for v6.8-rc2 Message-ID: <202401241201.A53405B0D1@keescook> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Linus, Please pull these execve fixes for v6.8-rc2. One change was sent as part of the original -rc1 PR, one is a recent fix, and the rest are cleanups related to moving the open() earlier. I was waiting for a couple -next cycles since -rc1, and since we were already working on the in_execve fix, I figured I should send this PR now too. Thanks! -Kees The following changes since commit 6613476e225e090cc9aad49be7fa504e290dd33d: Linux 6.8-rc1 (2024-01-21 14:11:32 -0800) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git tags/execve-v6.8-rc2 for you to fetch changes up to 90383cc07895183c75a0db2460301c2ffd912359: exec: Distinguish in_execve from in_exec (2024-01-24 11:48:52 -0800) ---------------------------------------------------------------- execve fixes for v6.8-rc2 - Fix error handling in begin_new_exec() (Bernd Edlinger) - MAINTAINERS: specifically mention ELF (Alexey Dobriyan) - Various cleanups related to earlier open() (Askar Safin, Kees Cook) ---------------------------------------------------------------- Alexey Dobriyan (1): ELF, MAINTAINERS: specifically mention ELF Askar Safin (1): exec: remove useless comment Bernd Edlinger (1): exec: Fix error handling in begin_new_exec() Kees Cook (2): exec: Add do_close_execat() helper exec: Distinguish in_execve from in_exec MAINTAINERS | 3 ++- fs/exec.c | 39 ++++++++++++++++++++++++++++++--------- include/linux/sched.h | 2 +- kernel/fork.c | 1 + 4 files changed, 34 insertions(+), 11 deletions(-) -- Kees Cook