This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v2 0/3] posix: Execute file function fixes


On Fri, 19 Feb 2016, Paul Eggert wrote:

> On 02/19/2016 10:05 AM, Adhemerval Zanella wrote:
> > * Regarding stack allocation safeness for exec function family I saw no
> >    safe solution.
> 
> This is a significant regression from the current behavior. We need a better
> solution. Otherwise, I fear that it will be too easy for attackers to exploit
> stack-overflow vulnerabilities by attempting to execute commands with many
> arguments.

This is a case where, as noted in 
<https://sourceware.org/ml/libc-alpha/2016-02/msg00044.html>, the stack 
usage is proportional to the number of arguments passed by the caller - 
that is, it's something determined statically at compile time, not under 
the control of an attacker.

While alloca of an amount proportional to the number or size of arguments 
passed is not ideal, I don't think it's a vulnerability the way any 
unbounded alloca of an amount not proportional to stack space already used 
is.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]