Summary: | libresolv res_init() does not correctly inititalize internals | ||
---|---|---|---|
Product: | glibc | Reporter: | Joshua Rogers <sourceware-bugs> |
Component: | libc | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | drepper.fsp, sourceware-bugs |
Priority: | P2 | Flags: | fweimer:
security-
|
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Joshua Rogers
2015-03-14 13:51:00 UTC
Sorry, if ((ret == 0) && (last_mtime != statbuf.st_mtim.tv_sec)) { should be if ((ret == 0) && (last_mtime != statbuf.st_mtime)) { (for reference) Only these are kept on res_init(), and thus are only kept with the first call to __res_maybe_init: int retrans; /* retransmition time interval */ int retry; /* number of times to retransmit */ u_long options; /* option flags - see below. */ These are wiped, due to this bug: int nscount; /* number of name servers */ struct sockaddr_in nsaddr_list[MAXNS]; /* address of name server */ # define nsaddr nsaddr_list[0] /* for backward compatibility */ u_short id; /* current message id */ /* 2 byte hole here. */ char *dnsrch[MAXDNSRCH+1]; /* components of domain to search */ char defdname[256]; /* default domain (deprecated) */ u_long pfcode; /* RES_PRF_ flags - see below. */ unsigned ndots:4; /* threshold for initial abs. query */ unsigned nsort:4; /* number of elements in sort_list[] */ unsigned ipv6_unavail:1; /* connecting to IPv6 server failed */ This bug is not in the latest respoistory, and is most likely Ubuntu-specific. https://sourceware.org/git/?p=glibc.git;a=blob;f=resolv/res_libc.c;h=ee3fa2114b7051b86f6f9676f1151d1435dedb9d;hb=HEAD#l94 Reported here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1432378 |