linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: kernel test robot <oliver.sang@intel.com>,
	Kees Cook <keescook@chromium.org>,
	Ariadne Conill <ariadne@dereferenced.org>
Cc: Ariadne Conill <ariadne@dereferenced.org>,
	0day robot <lkp@intel.com>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Matthew Wilcox <willy@infradead.org>,
	Rich Felker <dalias@libc.org>,
	Eric Biederman <ebiederm@xmission.com>,
	Alexander Viro <viro@zeniv.linux.org.uk>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-fsdevel@vger.kernel.org, linux-mm@kvack.org,
	stable@vger.kernel.org
Subject: Re: [fs/exec]  80bd5afdd8: xfstests.generic.633.fail
Date: Mon, 31 Jan 2022 16:08:19 +0100	[thread overview]
Message-ID: <20220131150819.iuqlz3rz6q7cheap@wittgenstein> (raw)
In-Reply-To: <20220131144352.GE16385@xsang-OptiPlex-9020>

On Mon, Jan 31, 2022 at 10:43:52PM +0800, kernel test robot wrote:
> 
> 
> Greeting,
> 
> FYI, we noticed the following commit (built with gcc-9):
> 
> commit: 80bd5afdd8568e41fc3a75c695bb179e0d9eee4d ("[PATCH v3] fs/exec: require argv[0] presence in do_execveat_common()")
> url: https://github.com/0day-ci/linux/commits/Ariadne-Conill/fs-exec-require-argv-0-presence-in-do_execveat_common/20220127-080829
> base: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git 2c271fe77d52a0555161926c232cd5bc07178b39
> patch link: https://lore.kernel.org/lkml/20220127000724.15106-1-ariadne@dereferenced.org
> 
> in testcase: xfstests
> version: xfstests-x86_64-972d710-1_20220127
> with following parameters:
> 
> 	disk: 4HDD
> 	fs: f2fs
> 	test: generic-group-31
> 	ucode: 0xe2
> 
> test-description: xfstests is a regression test suite for xfs and other files ystems.
> test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
> 
> 
> on test machine: 4 threads Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz with 32G memory
> 
> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
> 
> 
> 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kernel test robot <oliver.sang@intel.com>
> 
> 
> 
> user  :warn  : [  208.077271] run fstests generic/633 at 2022-01-30 04:50:49
> kern  :warn  : [  208.529090] Attempted to run process '/dev/fd/5/file1' with NULL argv
> user  :notice: [  208.806756] generic/633       [failed, exit status 1]- output mismatch (see /lkp/benchmarks/xfstests/results//generic/633.out.bad)
> 
> user  :notice: [  208.826454]     --- tests/generic/633.out     2022-01-27 11:54:16.000000000 +0000
> 
> user  :notice: [  208.842458]     +++ /lkp/benchmarks/xfstests/results//generic/633.out.bad     2022-01-30 04:50:49.769538285 +0000
> 
> user  :notice: [  208.859622]     @@ -1,2 +1,4 @@
> 
> user  :warn  : [  208.860623] run fstests generic/634 at 2022-01-30 04:50:49
> user  :notice: [  208.866037]      QA output created by 633
> 
> user  :notice: [  208.889262]      Silence is golden
> 
> user  :notice: [  208.901240]     +idmapped-mounts.c: 3608: setid_binaries - Invalid argument - failure: sys_execveat

This is from the generic part of the vfs testsuite.
It verifies that set*id binaries are executed with the right e{g,u}id.
Part of that test calls execveat() as:

static char *argv[] = {
	NULL,
};

static char *envp[] = {
	"EXPECTED_EUID=5000",
	"EXPECTED_EGID=5000",
	NULL,
};

syscall(__NR_execveat, fd, some_path, argv, envp, 0);

I can fix this rather simply in our upstream fstests with:

static char *argv[] = {
	"",
};

I guess.

But doesn't

static char *argv[] = {
	NULL,
};

seem something that should work especially with execveat()?

Christian

  reply	other threads:[~2022-01-31 15:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27  0:07 [PATCH v3] fs/exec: require argv[0] presence in do_execveat_common() Ariadne Conill
2022-01-27  5:29 ` Kees Cook
2022-01-27 16:51   ` Eric W. Biederman
2022-01-31 14:43 ` [fs/exec] 80bd5afdd8: xfstests.generic.633.fail kernel test robot
2022-01-31 15:08   ` Christian Brauner [this message]
2022-01-31 15:19     ` Matthew Wilcox
2022-01-31 15:37       ` Christian Brauner
2022-01-31 15:51         ` Matthew Wilcox
2022-01-31 16:14           ` Christian Brauner
2022-01-31 17:13             ` Christian Brauner
2022-01-31 21:59               ` Andrew Morton
2022-01-31 22:49                 ` Kees Cook
2022-02-01 13:28                   ` Christian Brauner
2022-02-01 13:28                 ` Christian Brauner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220131150819.iuqlz3rz6q7cheap@wittgenstein \
    --to=brauner@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=ariadne@dereferenced.org \
    --cc=dalias@libc.org \
    --cc=ebiederm@xmission.com \
    --cc=keescook@chromium.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=mtk.manpages@gmail.com \
    --cc=oliver.sang@intel.com \
    --cc=stable@vger.kernel.org \
    --cc=viro@zeniv.linux.org.uk \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).