selftests/exec: test for empty string on NULL argv
authorKees Cook <keescook@chromium.org>
Wed, 16 Feb 2022 04:32:05 +0000 (15:32 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 17 Feb 2022 03:46:56 +0000 (14:46 +1100)
commit7bc30d556cbc3db4660840d59d0e2c0bcd37992b
treed0c10585eb264275939602da71f312784a577c95
parentf5e4c540708a2c4c7c13bb8b0f6ae8ee1dfa121c
selftests/exec: test for empty string on NULL argv

Test for the NULL argv argument producing a single empty string on exec.

Link: https://lkml.kernel.org/r/20220201011637.2457646-1-keescook@chromium.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Yang Yingliang <yangyingliang@huawei.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Ariadne Conill <ariadne@dereferenced.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Rich Felker <dalias@libc.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
tools/testing/selftests/exec/Makefile
tools/testing/selftests/exec/null-argv.c [new file with mode: 0644]