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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D1DFC433F5 for ; Tue, 1 Feb 2022 13:28:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B121F6B01A7; Tue, 1 Feb 2022 08:28:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AC1D66B01A9; Tue, 1 Feb 2022 08:28:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 989C46B01AA; Tue, 1 Feb 2022 08:28:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0209.hostedemail.com [216.40.44.209]) by kanga.kvack.org (Postfix) with ESMTP id 889396B01A7 for ; Tue, 1 Feb 2022 08:28:54 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4DC5F18194D62 for ; Tue, 1 Feb 2022 13:28:54 +0000 (UTC) X-FDA: 79094291388.22.AA8DC93 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf09.hostedemail.com (Postfix) with ESMTP id D016A140005 for ; Tue, 1 Feb 2022 13:28:53 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 245016154B; Tue, 1 Feb 2022 13:28:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 252C4C340EB; Tue, 1 Feb 2022 13:28:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1643722132; bh=cXcPTewqmwfdy6WLzBYTm7mmiY7gQapV5gLUnxXuBJM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=X8GRn9j/6VclNn2LaMi7ILPvNbU/WrXIIlXxEKwimOnwbWX9YeOOUylmsw61ESpXu pEVDMCNaVgxh1uZbW3sYgofCcZ2zIcSuq2GCl7lrU4fM65WJSONbV1PrFBn+L+eA3i fpXLXbrc0mbqhQfGIEW6Srqrnm8jYUtziPsBBRzZyMGCA90aFlUuQapvjqOvy2NT0k 9zYOwH6mwPO0EmOoUshgBFDcbaFg1mzurh6+EbcVw9lebGwFoakXr9DhdhRlZVvz4q x5MdzJGoCrl6HODSKJy9w0vrWhV8dk4ID11sxcfecfX2Xweb/rjQFiStiIfBD7ly0X yg9DwCidSsRIw== Date: Tue, 1 Feb 2022 14:28:46 +0100 From: Christian Brauner To: Kees Cook Cc: Andrew Morton , Matthew Wilcox , kernel test robot , Ariadne Conill , 0day robot , Michael Kerrisk , Rich Felker , Eric Biederman , Alexander Viro , LKML , lkp@lists.01.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, stable@vger.kernel.org Subject: Re: [fs/exec] 80bd5afdd8: xfstests.generic.633.fail Message-ID: <20220201132846.7rrkosqyeidij47w@wittgenstein> References: <20220127000724.15106-1-ariadne@dereferenced.org> <20220131144352.GE16385@xsang-OptiPlex-9020> <20220131150819.iuqlz3rz6q7cheap@wittgenstein> <20220131153707.oe45h7tuci2cbfuv@wittgenstein> <20220131161415.wlvtsd4ecehyg3x5@wittgenstein> <20220131171344.77iifun5wdilbqdz@wittgenstein> <20220131135940.20790cff1747e79dd855aaf4@linux-foundation.org> <202201311447.4A1CCAF@keescook> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <202201311447.4A1CCAF@keescook> X-Rspam-User: nil X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: D016A140005 X-Stat-Signature: s7nrc46cfophmtj4o64zdt5z7h4aszu1 Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b="X8GRn9j/"; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf09.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org X-HE-Tag: 1643722133-330349 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Jan 31, 2022 at 02:49:36PM -0800, Kees Cook wrote: > On Mon, Jan 31, 2022 at 01:59:40PM -0800, Andrew Morton wrote: > > On Mon, 31 Jan 2022 18:13:44 +0100 Christian Brauner wrote: > > > > > > in other words, the changes that you see CMD_ARGS[0] == NULL for > > > > execveat() seem higher than for path-based exec. > > > > > > > > To counter that we should probably at least update the execveat() > > > > manpage with a recommendation what CMD_ARGS[0] should be set to if it > > > > isn't allowed to be set to NULL anymore. This is why was asking what > > > > argv[0] is supposed to be if the binary doesn't take any arguments. > > > > > > Sent a fix to our fstests now replacing the argv[0] as NULL with "". > > > > As we hit this check so quickly, I'm thinking that Ariadne's patch > > "fs/exec: require argv[0] presence in do_execveat_common()" (which > > added the check) isn't something we'll be able to merge into mainline? > > I think the next best would be to mutate an NULL argv into { "", NULL }. > However, I still think we should do the pr_warn(). > > Thoughts? +1