[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#377512: marked as done (libc6: valgrind warning about getifaddrs)



Your message dated Sun, 15 Apr 2007 02:37:13 +0200
with message-id <[🔎] 20070415003713.GA17431@artemis>
and subject line Bug#377512: libc6: valgrind warning about getifaddrs
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libc6
Version: 2.3.6-15
Severity: minor

Hi,
	using getifaddrs i get the following valgrind warning :

==12949== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
==12949==    at 0xE633ACC: sendto (socket.S:106)
==12949==    by 0xE651F48: __netlink_sendreq (ifaddrs.c:112)
==12949==    by 0xE6521E4: __netlink_request (ifaddrs.c:131)
==12949==    by 0xE652AD8: getifaddrs (ifaddrs.c:390)

Indeed, ./glibc-2.3.6/sysdeps/unix/sysv/linux/ifaddrs.c:

 92  struct
 93   {
 94     struct nlmsghdr nlh;
 95     struct rtgenmsg g;
 96   } req;
 97   struct sockaddr_nl nladdr;
....
101
102   req.nlh.nlmsg_len = sizeof (req);
103   req.nlh.nlmsg_type = type;
104   req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
105   req.nlh.nlmsg_pid = 0;
106   req.nlh.nlmsg_seq = h->seq;
107   req.g.rtgen_family = AF_UNSPEC;
....
112   return TEMP_FAILURE_RETRY (__sendto (h->fd, (void *) &req, sizeof (req), 0,
113                                        (struct sockaddr *) &nladdr,
114                                        sizeof (nladdr)));

some members are not initialized.


-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-powerpc
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to fr_FR.UTF-8)

Versions of packages libc6 depends on:
ii  tzdata                        2006g-2    Time Zone and Daylight Saving Time

libc6 recommends no packages.

-- no debconf information


--- End Message ---
--- Begin Message ---
On Sun, Jul 09, 2006 at 05:57:43PM +0200, Benoît Dejean wrote:
> Package: libc6
> Version: 2.3.6-15
> Severity: minor
> 
> Hi,
> 	using getifaddrs i get the following valgrind warning :
> 
> ==12949== Syscall param socketcall.sendto(msg) points to uninitialised byte(s)
> ==12949==    at 0xE633ACC: sendto (socket.S:106)
> ==12949==    by 0xE651F48: __netlink_sendreq (ifaddrs.c:112)
> ==12949==    by 0xE6521E4: __netlink_request (ifaddrs.c:131)
> ==12949==    by 0xE652AD8: getifaddrs (ifaddrs.c:390)
> 
> Indeed, ./glibc-2.3.6/sysdeps/unix/sysv/linux/ifaddrs.c:
> 
>  92  struct
>  93   {
>  94     struct nlmsghdr nlh;
>  95     struct rtgenmsg g;
>  96   } req;
>  97   struct sockaddr_nl nladdr;
> ....
> 101
> 102   req.nlh.nlmsg_len = sizeof (req);
> 103   req.nlh.nlmsg_type = type;
> 104   req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
> 105   req.nlh.nlmsg_pid = 0;
> 106   req.nlh.nlmsg_seq = h->seq;
> 107   req.g.rtgen_family = AF_UNSPEC;
> ....
> 112   return TEMP_FAILURE_RETRY (__sendto (h->fd, (void *) &req, sizeof (req), 0,
> 113                                        (struct sockaddr *) &nladdr,
> 114                                        sizeof (nladdr)));
> 
> some members are not initialized.

  that's an interesting assertion, but you should look in the kernel
headers to verify (like I did) that rtgenmsg and nlmsghdr members are
all initialized in the very code you just cited.

  Though, in the 2.5 libc the possible paddings have been set to 0,
hence that (harmless) valgrind warning should anyway now be gone.

-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org

Attachment: pgpZAiZzENKc2.pgp
Description: PGP signature


--- End Message ---

Reply to: