public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/11571] getlogin_r (NULL, 0) segfaults
       [not found] <bug-11571-131@http.sourceware.org/bugzilla/>
@ 2014-06-30 18:07 ` fweimer at redhat dot com
  0 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30 18:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=11571

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/11571] getlogin_r (NULL, 0) segfaults
  2010-05-05 16:01 [Bug libc/11571] New: " rjones at redhat dot com
  2010-05-05 16:03 ` [Bug libc/11571] " rjones at redhat dot com
  2010-05-05 16:09 ` rjones at redhat dot com
@ 2010-05-05 16:45 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: drepper at redhat dot com @ 2010-05-05 16:45 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From drepper at redhat dot com  2010-05-05 16:45 -------
Fixed in git.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=11571

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/11571] getlogin_r (NULL, 0) segfaults
  2010-05-05 16:01 [Bug libc/11571] New: " rjones at redhat dot com
  2010-05-05 16:03 ` [Bug libc/11571] " rjones at redhat dot com
@ 2010-05-05 16:09 ` rjones at redhat dot com
  2010-05-05 16:45 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rjones at redhat dot com @ 2010-05-05 16:09 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From rjones at redhat dot com  2010-05-05 16:08 -------
Problem is:

  getlogin_r.c:84   strncpy (name, pwd.pw_name, namesize - 1);

http://sourceware.org/git/?
p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/getlogin_r.c;h=d9c66fe2598fb9dbc0fe1a6577f5db420598
0392;hb=HEAD#l84

namesize == 0, so it calls strncpy with -1 as the 3rd parameter.

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11571

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libc/11571] getlogin_r (NULL, 0) segfaults
  2010-05-05 16:01 [Bug libc/11571] New: " rjones at redhat dot com
@ 2010-05-05 16:03 ` rjones at redhat dot com
  2010-05-05 16:09 ` rjones at redhat dot com
  2010-05-05 16:45 ` drepper at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: rjones at redhat dot com @ 2010-05-05 16:03 UTC (permalink / raw)
  To: glibc-bugs


------- Additional Comments From rjones at redhat dot com  2010-05-05 16:03 -------
Note the problem is the zero length, not the
NULL pointer.  For example this also segfaults:

#include <unistd.h>

main ()
{
  char buffer[10000];
  getlogin_r (buffer, 0);
}


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11571

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-06-30 18:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-11571-131@http.sourceware.org/bugzilla/>
2014-06-30 18:07 ` [Bug libc/11571] getlogin_r (NULL, 0) segfaults fweimer at redhat dot com
2010-05-05 16:01 [Bug libc/11571] New: " rjones at redhat dot com
2010-05-05 16:03 ` [Bug libc/11571] " rjones at redhat dot com
2010-05-05 16:09 ` rjones at redhat dot com
2010-05-05 16:45 ` drepper at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).