+2018-11-27 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #23927]
+ CVE-2018-19591
+ * sysdeps/unix/sysv/linux/if_index.c (__if_nametoindex): Avoid
+ descriptor leak in case of ENODEV error.
+
2018-11-08 Alexandra Hájková <ahajkova@redhat.com>
[BZ #17630]
architecture could write beyond the target buffer, resulting in a buffer
overflow. Reported by Andreas Schwab.
+ CVE-2018-19591: A file descriptor leak in if_nametoindex can lead to a
+ denial of service due to resource exhaustion when processing getaddrinfo
+ calls with crafted host names. Reported by Guido Vranken.
+
The following bugs are resolved with this release:
[16750] ldd: Never run file directly.
[23562] signal: Use correct type for si_band in siginfo_t
[23579] libc: Errors misreported in preadv2
[23709] Fix CPU string flags for Haswell-type CPUs
+ [23927] Linux if_nametoindex() does not close descriptor (CVE-2018-19591)
\f
Version 2.26
return 0;
#else
struct ifreq ifr;
- int fd = __opensock ();
-
- if (fd < 0)
- return 0;
-
if (strlen (ifname) >= IFNAMSIZ)
{
__set_errno (ENODEV);
}
strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
+
+ int fd = __opensock ();
+
+ if (fd < 0)
+ return 0;
+
if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0)
{
int saved_errno = errno;