grub/grub-core/net
Andrei Borzenkov 52408aa946 dns: fix buffer overflow for data->addresses in recv_hook
We may get more than one response before exiting out of loop in
grub_net_dns_lookup, but buffer was allocated for the first response only,
so storing answers from subsequent replies wrote past allocated size.
We never really use more than the very first address during lookup so there
is little point in collecting all of them. Just quit early if we already have
some reply.

Code needs serious redesign to actually collect multiple answers
and select the best fit according to requested type (IPv4 or IPv6).

Reported and tested by Michael Chang <mchang@suse.com>
2016-07-26 20:38:58 +03:00
..
drivers net: fix ipv6 routing 2016-02-25 22:38:52 +03:00
arp.c net: trivial grub_cpu_to_XX_compile_time cleanup 2015-03-27 18:58:57 +03:00
bootp.c bootp: check that interface is not NULL in configure_by_dhcp_ack 2016-03-20 10:32:33 +03:00
dns.c dns: fix buffer overflow for data->addresses in recv_hook 2016-07-26 20:38:58 +03:00
ethernet.c Add gcc_struct to all packed structures when compiling with mingw. 2013-12-15 14:14:30 +01:00
http.c http: reset EOF indication in http_seek 2016-04-30 09:13:34 +03:00
icmp.c arp, icmp: Fix handling in case of oversized or invalid packets. 2015-03-27 12:18:25 +01:00
icmp6.c net: fix ipv6 routing 2016-02-25 22:38:52 +03:00
ip.c net/ip: check result of grub_netbuff_push 2015-01-30 22:09:51 +03:00
net.c net: translate pxe prefix to tftp when checking for self-load 2016-05-03 19:23:31 +03:00
netbuff.c arp, icmp: Fix handling in case of oversized or invalid packets. 2015-03-27 12:18:25 +01:00
tcp.c tcp: fix memory leaks 2016-01-16 20:59:50 +03:00
tftp.c tftp: fix memory leaks in open 2016-01-16 21:27:57 +03:00
udp.c * grub-core/disk/ahci.c: Add needed explicit cast. 2013-08-21 21:02:14 +02:00