+2017-11-15 Steve Ellcey <sellcey@cavium.com>
+
+ [BZ #22442]
+ * sysdeps/unix/sysv/linux/if_index.c (__if_nametoindex):
+ Check if ifname is too long.
+
2018-06-29 Daniel Alvarez <dalvarez@redhat.com>
Jakub Sitnicki <jkbs@redhat.com>
[22299] x86-64: Don't set GLRO(dl_platform) to NULL
[22320] glob: Fix one-byte overflow (CVE-2017-15670)
[22321] sysconf: Fix missing definition of UIO_MAXIOV on Linux
+ [22442] if_nametoindex: Check length of ifname before copying it
[22322] libc: [mips64] wrong bits/long-double.h installed
[22325] glibc: Memory leak in glob with GLOB_TILDE (CVE-2017-15671)
[22342] NSCD not properly caching netgroup
if (fd < 0)
return 0;
+ if (strlen (ifname) >= IFNAMSIZ)
+ {
+ __set_errno (ENODEV);
+ return 0;
+ }
+
strncpy (ifr.ifr_name, ifname, sizeof (ifr.ifr_name));
if (__ioctl (fd, SIOCGIFINDEX, &ifr) < 0)
{