3 ms·
How did polkit even fall victim to this? I sometimes feel hesitant to include an argv[0] in my execvX functions because I know that it's only "a convention" and
by netr0ute 5y ago
How did polkit even fall victim to this? I sometimes feel hesitant to include an argv[0] in my execvX functions because I know that it's only "a convention" and not an enforced rule, and no reasonable program should expect it to be there.
- josephcsible 5y agoI wrote a summary here: https://news.ycombinator.com/item?id=30091667 https://news.ycombinator.com/item?id=30091667 The tl;dr is that pkexec writes to argv, and envp comes right after argv on the stack, so a missing check caused it to accidentally write to envp when argc == 0.