lkml.org 
[lkml]   [1998]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: mmap bug?

On Fri, 29 May 1998, Dean Gaudet wrote:

> > Thank you.
> >
> > I was surprised at the number of people prepared to tell me not to
> > mmap zero length areas. Here's a trivial patch to fix this, although
> > I don't know if this will affect many programs.
>
> I'm surprised that you never answered the important question: If you're
> mapping 0 bytes then how the hell do you get a SEGV? You shouldn't be

I'm surprised you've failed to read the thread properly. As mentioned, the
problem is in glibc. It stat()'s a file then mmap()'s it with the length
returned by stat. I think it assumes a certain length on the file...

The file is LC_MESSAGES related and cropped up investigating possible
insecurities in glibc. It happily trusts whatever the user sets LANG to
when running suid programs. Having these then crash isn't great.

Chris


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:42    [W:0.028 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site