| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Only gaih_inet() and gaih_inet_serv() use a special bit flag denoted
by the GAIH_OKIFUNSPEC macro. Only the return value of
gaih_inet_serv() is actively checked for the bit flag which is
redundant because it just copies the nonzero property of the value
otherwise returned. The return value of gaih_inet() is only checked
for being zero and then the bit flag is filtered out. As the bit flag
is set only for otherwise nonzero return values, it doesn't affect the
zero comparison. GAIH_EAI just an alias to ~GAIH_OKIFUNSPEC.
|
| |
|
|
|
|
|
|
|
|
| |
Resolves #16072 (CVE-2013-4458).
This patch fixes another stack overflow in getaddrinfo when it is
called with AF_INET6. The AF_UNSPEC case was fixed as CVE-2013-1914,
but the AF_INET6 case went undetected back then.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[BZ #9954]
With the following /etc/hosts:
127.0.0.1 www.my-domain.es
127.0.1.1 www.my-domain.es
192.168.0.1 www.my-domain.es
Using getaddrinfo() on www.my-domain.es, trigger the following assertion:
../sysdeps/posix/getaddrinfo.c:1473: rfc3484_sort: Assertion
`src->results[i].native == -1 || src->results[i].native == a1_native' failed.
This is due to two different bugs:
- In rfc3484_sort() rule 7, src->results[i].native is assigned even if
src->results[i].index is -1, meaning that no interface is associated.
- In getaddrinfo() the source IP address used with the lo interface needs a
special case, as it can be any IP within 127.X.Y.Z.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes BZ #15339.
NSS_STATUS_UNAVAIL may mean that a necessary input resource is not
available. This could occur in a number of cases including when the
network is down, system runs out of file descriptors, etc. The
correct differentiator in such a case is the h_errno, which gives the
nature of failure. In case of failures other than a simple 'not
found', we set h_errno as NETDB_INTERNAL and let errno be the
identifier for the exact error.
|
| |
|
|
|
|
|
| |
Replace repeated computations of alloca size with a local variable
that stores the computed value.
|
| |
|
|
|
|
| |
Resolves BZ #14719.
|
|
|
|
|
|
|
|
|
| |
When glibc is built with --enable-static-nss, the warning that
using NSS symbols requires the nss shared objects to be present
is no longer true, as those symbols are built into libc. Suppress
the warning for those symbols by providing a new macro
(nss_interface_function) for the NSS functions that is defined as
static_link_warning in the normal case, and empty for static NSS.
|
|
|
|
|
|
|
|
|
| |
* sysdeps/posix/getaddrinfo.c (default_scopes): Map RFC 1918
* addresses
to global scope.
* posix/tst-rfc3484.c: Verify 10/8, 172.16/12 and 196.128/16
addresses are in the same scope as 192.0.2/24.
* posix/gai.conf: Document new scope table defaults.
|
|
|
|
| |
if the family is PF_UNSPEC.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
limit
[BZ #14307]
* sysdeps/posix/getaddrinfo.c (gaih_inet): Increase the size of
the temporary buffer used to invoke __gethostbyname2_r,
__gethostbyaddr_r and gethostbyname4_r to make room for struct
host_data / struct gaih_addrtuple.
* resolv/nss_dns/dns-host.c (global scope): Move definition of
implementation constants MAX_NR_ALIASES and MAX_NR_ADDRS to
header file nss/nsswitch.h.
* nss/nsswitch.h (global scope): Add definition of implementation
constants MAX_NR_ALIASES and MAX_NR_ADDRS (moved from
resolv/nss_dns/dns-host.c).
|
| |
|
|
|
|
| |
No need to ever not use c and e.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Whenever getaddrinfo needed network interface information it used the
netlink interface to read the information every single time. The
problem is that this information can change at any time.
The patch implements monitoring of the network interfaces through
nscd. If no change is detected the previously read information can
be reused (which is the norm). This timestamp information is also
made available to other processes using the shared memory segment
between nscd and those processes.
|
| |
|
| |
|
| |
|
|
|
|
| |
Problem introduced in the last patch.
|
|
|
|
|
| |
A recent patch introduced a problem where IPv6 lookups happily returned
IPv4 addresses.
|
| |
|
| |
|
|
|
|
|
|
| |
getaddrinfo works around the resolver functionality to avoid automatic
IPv6 lookups. The restoring didn't allow for the resolver to set
additional bits in _res.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
While at it fix interaction between __nss_configure_lookup and nscd.
Otherwise the test fails if nscd is runnung.
|
|
|
|
| |
If the v4 lookup failed but v6 succeeded we treat this as a success.
|
|
|
|
|
|
|
| |
When not using gethostbyname4 methods we immediately aborted the loop
over the nss modules on the first successful lookup. While this is
almost always what is wanted the nsswitch.conf file allows to select
something different.
|
| |
|
| |
|
|
|
|
|
| |
getaddrinfo didn't update the status variable in that round of the
loop if no callback was used.
|
|
|
|
| |
gethostbyname4_r function call succeeded, just leave the loop.
|
|
|
|
|
|
|
|
|
| |
ESRCH return value.
(_nss_dns_gethostbyname4_r): Likewise.
* resolv/res_init.c (__res_vinit): Initialize nscount to zero.
* sysdeps/posix/getaddrinfo.c (gaih_inet): In case we use
gethostbyname4_r, we don't have a separate IPv6 status, so copy
the no_data variable.
|
|
|
|
| |
to IPv4 or IPv6 if an interface has been found.
|
|
|
|
| |
neither IPv4 nor IPv6 addresses defined, don't do anything.
|
|
|
|
| |
buffer passed to NSS functions.
|
|
|
|
| |
better place so it is not called when nscd is used.
|
|
|
|
| |
entry is available, believe it.
|
|
|
|
| |
lookup, don't assign canon unconditionally.
|
|
|
|
| |
converting to v4 mapped addressed.
|
|
|
|
| |
to be treated like link-local addresses.
|
|
|
|
| |
if necessary.
|