Re: binfmts.h MAX_ARG_STRINGS excessive value allows heap spraying

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 03/09/2017 06:10 PM, Joseph Myers wrote:
> On Thu, 9 Mar 2017, Leonard den Ottolander wrote:
> 
>> So if we really want to support lets say users having directories of
>> 128k files we can now safely set MAX_ARG_STRINGS to 131072 and assuming
>> an average file name length of 32 set MAX_ARG_STRSLEN to 4194304.
> 
> I think 128k files is too small.  E.g. I have nearly 4 million archived 
> emails here, and I'm sure many people have many more than that, and it's 
> common to store emails one per file in a large directory (although I'm not 
> storing them like that), and I think normal command-line tools ought to be 
> able to take all the files in such a directory on the command line at 
> once.
> 
> I think it's best not to limit the number of arguments beyond the limit 
> implied by argc being an int, and no individual object (e.g. the argv 
> array) taking up half or more of the address space, along possibly with a 
> limit on the proportion of the whole address space taken up by 
> (command-line arguments + environment variables + all the pointers to 
> those).
 
Agreed.

-- 
Cheers,
Carlos.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux