public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/13895] New: SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss
@ 2012-03-23 17:11 ppluzhnikov at google dot com
  2012-03-23 19:17 ` [Bug libc/13895] " ppluzhnikov at google dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2012-03-23 17:11 UTC (permalink / raw)
  To: glibc-bugs

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

             Bug #: 13895
           Summary: SIGSEGV in __nss_lookup_function for static binary
                    when configured with --enable-static-nss
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: ppluzhnikov@google.com
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Created attachment 6299
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6299
proposed patch

Original report:
http://sourceware.org/ml/libc-alpha/2012-03/msg00080.html

Reproduces with current git:
commit 3ff4252677ff55a0dd4ded5b5cbccda25812ba12
Author: Paul Pluzhnikov <ppluzhnikov@google.com>
Date:   Fri Mar 23 09:47:03 2012 -0700

cat t.c

#include <sys/types.h>
#include <pwd.h>

int main()
{
  struct passwd *pw = getpwnam("root");
  return 0;
}

gcc -g -L. -static t.c
gdb -q ./a.out

Reading symbols from /tmp/build-static-nss/a.out...done.
(gdb) r

Program received signal SIGSEGV, Segmentation fault.
0x0000000000410878 in __nss_lookup_function (ni=0x6e5f50, fct_name=0x4af0df
"getpwnam_r") at nsswitch.c:460
460                 size_t namlen = (5 + strlen (ni->library->name) + 1
(gdb) bt
#0  0x0000000000410878 in __nss_lookup_function (ni=0x6e5f50, fct_name=0x4af0df
"getpwnam_r") at nsswitch.c:460
#1  0x0000000000410a6e in __nss_lookup (ni=0x7fffffffd4e8, fct_name=0x4af0df
"getpwnam_r", fct2_name=0x0, fctp=0x7fffffffd4e0) at nsswitch.c:161
#2  0x000000000040e416 in __getpwnam_r (name=0x4abf84 "root", resbuf=0x6e0ce0,
buffer=0x6e5840 "", buflen=1024, result=0x7fffffffd538) at
../nss/getXXbyYY_r.c:202
#3  0x000000000040e12c in getpwnam (name=0x4abf84 "root") at
../nss/getXXbyYY.c:116
#4  0x0000000000400e76 in main () at t.c:6
(gdb) p ni.library
$1 = (service_library *) 0x0
(gdb) p ni.name
$2 = 0x6e5f80 "files"

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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/13895] SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss
  2012-03-23 17:11 [Bug libc/13895] New: SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss ppluzhnikov at google dot com
@ 2012-03-23 19:17 ` ppluzhnikov at google dot com
  2012-04-06 20:56 ` ppluzhnikov at google dot com
  2014-06-26 13:44 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2012-03-23 19:17 UTC (permalink / raw)
  To: glibc-bugs

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

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |ppluzhnikov at google dot
                   |dot org                     |com

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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/13895] SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss
  2012-03-23 17:11 [Bug libc/13895] New: SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss ppluzhnikov at google dot com
  2012-03-23 19:17 ` [Bug libc/13895] " ppluzhnikov at google dot com
@ 2012-04-06 20:56 ` ppluzhnikov at google dot com
  2014-06-26 13:44 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: ppluzhnikov at google dot com @ 2012-04-06 20:56 UTC (permalink / raw)
  To: glibc-bugs

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

Paul Pluzhnikov <ppluzhnikov at google dot com> changed:

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

--- Comment #1 from Paul Pluzhnikov <ppluzhnikov at google dot com> 2012-04-06 20:56:14 UTC ---
Fixed by
http://sourceware.org/git/?p=glibc.git;a=commit;h=62470f605ed931f88fb1993f4440d5bb02afa2b1

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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/13895] SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss
  2012-03-23 17:11 [Bug libc/13895] New: SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss ppluzhnikov at google dot com
  2012-03-23 19:17 ` [Bug libc/13895] " ppluzhnikov at google dot com
  2012-04-06 20:56 ` ppluzhnikov at google dot com
@ 2014-06-26 13:44 ` fweimer at redhat dot com
  2 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-06-26 13:44 UTC (permalink / raw)
  To: glibc-bugs

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

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

end of thread, other threads:[~2014-06-26 13:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 17:11 [Bug libc/13895] New: SIGSEGV in __nss_lookup_function for static binary when configured with --enable-static-nss ppluzhnikov at google dot com
2012-03-23 19:17 ` [Bug libc/13895] " ppluzhnikov at google dot com
2012-04-06 20:56 ` ppluzhnikov at google dot com
2014-06-26 13:44 ` fweimer 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).