NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/56673: don't allow execve with NULL argv
The following reply was made to PR kern/56673; it has been noted by GNATS.
From: Jan Schaumann <jschauma%netmeister.org@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/56673: don't allow execve with NULL argv
Date: Sun, 30 Jan 2022 16:54:10 -0500
If we already reject argv == NULL itself, as noted by
mrg@, then I really don't see a good argument to allow
char *argv[1] = { 0 };
POSIX does not appear to prohibit enforcing argv[0] to
be non-NULL, and while it may at the same time _allow_
argv[0] == NULL, it strikes me as entirely reasonable
to prevent what almost inevitably is problematic.
While we can fix all code in the NetBSD source tree to
not assume argv[0] != NULL, we cannot do the same for
all add-on software. Preventing errant use of
(albeit permissible) coding errors makes for a more
robust OS.
Home |
Main Index |
Thread Index |
Old Index