[Slirp] [Git][slirp/libslirp][master] 2 commits: ndp_table: For unspecified address, return broadcast ethernet address
Samuel Thibault (@sthibaul)
gitlab at gitlab.freedesktop.org
Sun May 9 08:57:40 UTC 2021
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
1d6a89cc by Samuel Thibault at 2021-05-09T01:46:31+02:00
ndp_table: For unspecified address, return broadcast ethernet address
We cannot let the guest crash libslirp by making it answer a tftp
request such as shown in
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=33873
https://gitlab.com/qemu-project/qemu/-/issues/111
unspecified addresses may also be used for non-configured devices, so it
makes sense to use the broadcast ethernet address in that case, just
like we do with IPv4.
- - - - -
f23fd3f0 by Samuel Thibault at 2021-05-09T08:57:38+00:00
Merge branch 'master' into 'master'
ndp_table: For unspecified address, return broadcast ethernet address
See merge request slirp/libslirp!86
- - - - -
1 changed file:
- src/ndp_table.c
Changes:
=====================================
src/ndp_table.c
=====================================
@@ -62,7 +62,12 @@ bool ndp_table_search(Slirp *slirp, struct in6_addr ip_addr,
DEBUG_CALL("ndp_table_search");
DEBUG_ARG("ip = %s", addrstr);
- assert(!in6_zero(&ip_addr));
+ /* If unspecified address */
+ if (in6_zero(&ip_addr)) {
+ /* return Ethernet broadcast address */
+ memset(out_ethaddr, 0xff, ETH_ALEN);
+ return 1;
+ }
/* Multicast address: fec0::abcd:efgh/8 -> 33:33:ab:cd:ef:gh */
if (IN6_IS_ADDR_MULTICAST(&ip_addr)) {
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/61b287a16053172601e88bf99ede5e759fe1842b...f23fd3f0fbaecc75d083abf7a6124b3a21b961e1
--
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/61b287a16053172601e88bf99ede5e759fe1842b...f23fd3f0fbaecc75d083abf7a6124b3a21b961e1
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20210509/6db82f39/attachment.htm>
More information about the Slirp
mailing list