lkml.org 
[lkml]   [2010]   [Sep]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/2] execve: check the VM has enough memory at first
Date
> > On Wed, Sep 8, 2010 at 10:04 PM, KOSAKI Motohiro
> > <kosaki.motohiro@jp.fujitsu.com> wrote:
> > >
> > > After this patch, execve() expand stack at first and receive to
> > > check vm_enough_memory() properly. then, too long argument of
> > > execve() than the machine memory return EFAULT properly.
> >
> > This is horrible. We don't want to walk the arguments one more time
> > just for this. Let's just improve the checks that we do as we go
> > along.
> >
> > Linus
>
> Okey. I'll consider new way in this night.

After while thinking, I decided to just drop this idea. because
1) If one pass check is must, we can't reuse vm-overcommit check.
2) Glibc has the duplicated hueristic, then we can't change it nor
introduce new hard limit. (Sh*t)
3) This is not must fix, it only mitigate a pain when accidental large
argv case. Only OOM fixes enough care intended attack case.
4) distro can change default of rlim_max of RLIMIT_STACK. It protect
from RLIM_INFINITY smash.

Briefly says, to introduce new limit has bad benefit/risk balance. Sadly.





\
 
 \ /
  Last update: 2010-09-16 07:55    [W:0.077 / U:16.608 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site