Re: [patch] Fail execve on environment duplicates

2017-05-09 Thread martin
> On Tue, May 9, 2017 at 4:17 PM, Ted Unangst wrote: > > Matthew Martin wrote: > > I would suggest N^2 loops are automatically forgiveable, If there > is a limit on N, > which is a reasonable number for any supported environment, but total > potential > impact on performance for launching a p

Re: [patch] Fail execve on environment duplicates

2017-05-09 Thread Jimmy Hess
On Tue, May 9, 2017 at 4:17 PM, Ted Unangst wrote: > Matthew Martin wrote: I would suggest N^2 loops are automatically forgiveable, If there is a limit on N, which is a reasonable number for any supported environment, but total potential impact on performance for launching a process could be

Re: [patch] Fail execve on environment duplicates

2017-05-09 Thread Ted Unangst
Matthew Martin wrote: > Duplicate environment variables have been a source of bugs, so perhaps > the kernel should fail an execve with an invalid envp. Diff below checks > that each environment string contains a '=' and that there are no > duplicates up to the equals sign. It's not really the kern

[patch] Fail execve on environment duplicates

2017-05-08 Thread Matthew Martin
Duplicate environment variables have been a source of bugs, so perhaps the kernel should fail an execve with an invalid envp. Diff below checks that each environment string contains a '=' and that there are no duplicates up to the equals sign. So far I haven't noticed any breakage except for a pur