Re:Handling argc==0 in the Linux kernel
by isomel on Saturday February 05, 2022 @01:09AM
(#30218234)
But a "fix" in libc wouldn't help for the security risk because an attacker could still emit the system call directly.
(Unless I misunderstood what the fix would be)
[ Parent
| on HN ]
Re:Handling argc==0 in the Linux kernel
by asveikau on Saturday February 05, 2022 @01:18AM
(#30218300)
At first I imagine the libc killing the process if argv is empty.
Otoh if you want libc to be possibly a little too clever, perhaps it could make an effort to try to discover a sensible value for argv[0] based on looking around /proc etc to find the path to the binary. That seems like way too much complexity and failure points for a few mostly inconsequential corner cases.
Re:Handling argc==0 in the Linux kernel
by thingsgoup on Saturday February 05, 2022 @07:24AM
(#30220362)
If libc isn’t linked into the process to begin with then none of that matters.