public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/12095] New: getifaddrs() returns no IP address for ppp0
@ 2010-10-05 15:40 thomas.jarosch at intra2net dot com
  2010-10-06 12:17 ` [Bug libc/12095] " thomas.jarosch at intra2net dot com
  2014-06-30  7:53 ` fweimer at redhat dot com
  0 siblings, 2 replies; 3+ messages in thread
From: thomas.jarosch at intra2net dot com @ 2010-10-05 15:40 UTC (permalink / raw)
  To: glibc-bugs

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

           Summary: getifaddrs() returns no IP address for ppp0
           Product: glibc
           Version: 2.11
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper.fsp@gmail.com
        ReportedBy: thomas.jarosch@intra2net.com


Hello,

getifaddrs() doesn't return any IP address for a ppp device. Here's
the corresponding gdb output (during ifa_addr NULL pointer access):

(gdb) print ifa->ifa_flags
$1 = 69841
(gdb) print ifa->ifa_addr
$2 = (sockaddr *) 0x0
(gdb) print ifa->ifa_ifu
$3 = {ifu_broadaddr = 0x0, ifu_dstaddr = 0x0}
(gdb) print ifa->ifa_data
$4 = (void *) 0x8166e7c
(gdb) print ifa->ifa_name
$5 = 0x8166a88 "ppp0"
(gdb) print ifa->ifa_netmask
$6 = (sockaddr *) 0x0
(gdb) print ifa->ifa_ifu
$7 = {ifu_broadaddr = 0x0, ifu_dstaddr = 0x0}

If I run the "ip addr" command from the "iproute" package,
I see the following output:

11: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 3
    link/ppp 
    inet 212.144.74.201 peer 145.253.1.55/32 scope global ppp0

As "ip addr" also uses the netlink interface to retrieve the information,
I suspect this is a problem inside the getifaddrs() implementation.

My glibc version is 2.11.2+Fedora patches from Fedora 12.
A diff between sysdeps/unix/sysv/linux/ifaddrs.c from git HEAD
and the version shipped in Fedora 12 showed no differences.

Kernel version is 2.6.34.7.

Please let me know how I can help to track this down.

Cheers,
Thomas

-- 
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] 3+ messages in thread

* [Bug libc/12095] getifaddrs() returns no IP address for ppp0
  2010-10-05 15:40 [Bug libc/12095] New: getifaddrs() returns no IP address for ppp0 thomas.jarosch at intra2net dot com
@ 2010-10-06 12:17 ` thomas.jarosch at intra2net dot com
  2014-06-30  7:53 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: thomas.jarosch at intra2net dot com @ 2010-10-06 12:17 UTC (permalink / raw)
  To: glibc-bugs

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

Thomas Jarosch <thomas.jarosch at intra2net dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #1 from Thomas Jarosch <thomas.jarosch at intra2net dot com> 2010-10-06 12:17:27 UTC ---
Ok, with debug code added to sysdeps/unix/sysv/linux/ifaddrs.c,
I was able to see what's going on. The kernel first sends the ppp0 link
information (RTM_NEWLINK) without providing any address information.

Later on the addresses will be transmitted via a separate RTM_NEWADDR message.
As the application crashed while processing the NULL pointer from the first
ppp0 list node, I didn't luck further (could have spared me one day of
debugging ;)).

So this is not a bug and I'm closing it. 

Here comes the good part: It let to the discovery of bug #12093 and I've also
send a patch to the getifaddrs(3) man page maintainer with a patch to fix the
possible NULL pointer access in the example code.

Thanks for your time.

-- 
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] 3+ messages in thread

* [Bug libc/12095] getifaddrs() returns no IP address for ppp0
  2010-10-05 15:40 [Bug libc/12095] New: getifaddrs() returns no IP address for ppp0 thomas.jarosch at intra2net dot com
  2010-10-06 12:17 ` [Bug libc/12095] " thomas.jarosch at intra2net dot com
@ 2014-06-30  7:53 ` fweimer at redhat dot com
  1 sibling, 0 replies; 3+ messages in thread
From: fweimer at redhat dot com @ 2014-06-30  7:53 UTC (permalink / raw)
  To: glibc-bugs

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

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] 3+ messages in thread

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

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-05 15:40 [Bug libc/12095] New: getifaddrs() returns no IP address for ppp0 thomas.jarosch at intra2net dot com
2010-10-06 12:17 ` [Bug libc/12095] " thomas.jarosch at intra2net dot com
2014-06-30  7:53 ` 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).