Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/netinet6 Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/33fb30240f5c
branches: netbsd-9
changeset: 1001361:33fb30240f5c
user: martin <martin%NetBSD.org@localhost>
date: Sun Jan 05 09:54:52 2020 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #606):
sys/netinet6/ip6_mroute.c: revision 1.131
Don't forget to initialize 'sin6_len'. With kASan, from time to time the
value will be bigger than the size of the source, and we get a read
overflow. With kMSan the uninitialized access is detected immediately.
diffstat:
sys/netinet6/ip6_mroute.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diffs (49 lines):
diff -r f17d6b399c2e -r 33fb30240f5c sys/netinet6/ip6_mroute.c
--- a/sys/netinet6/ip6_mroute.c Sun Jan 05 09:53:18 2020 +0000
+++ b/sys/netinet6/ip6_mroute.c Sun Jan 05 09:54:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_mroute.c,v 1.130 2019/07/24 02:38:29 msaitoh Exp $ */
+/* $NetBSD: ip6_mroute.c,v 1.130.2.1 2020/01/05 09:54:52 martin Exp $ */
/* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */
/*
@@ -117,7 +117,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.130 2019/07/24 02:38:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.130.2.1 2020/01/05 09:54:52 martin Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -540,9 +540,8 @@
for (mifi = 0; mifi < nummifs; mifi++) {
if (mif6table[mifi].m6_ifp &&
!(mif6table[mifi].m6_flags & MIFF_REGISTER)) {
- sin6.sin6_family = AF_INET6;
- sin6.sin6_addr = in6addr_any;
ifp = mif6table[mifi].m6_ifp;
+ sockaddr_in6_init(&sin6, &in6addr_any, 0, 0, 0);
if_mcast_op(ifp, SIOCDELMULTI,
sin6tocsa(&sin6));
}
@@ -674,8 +673,7 @@
* Enable promiscuous reception of all IPv6 multicasts
* from the interface.
*/
- sin6.sin6_family = AF_INET6;
- sin6.sin6_addr = in6addr_any;
+ sockaddr_in6_init(&sin6, &in6addr_any, 0, 0, 0);
error = if_mcast_op(ifp, SIOCADDMULTI, sin6tosa(&sin6));
splx(s);
if (error)
@@ -732,8 +730,7 @@
*/
ifp = mifp->m6_ifp;
- sin6.sin6_family = AF_INET6;
- sin6.sin6_addr = in6addr_any;
+ sockaddr_in6_init(&sin6, &in6addr_any, 0, 0, 0);
if_mcast_op(ifp, SIOCDELMULTI, sin6tosa(&sin6));
} else {
if (reg_mif_num != (mifi_t)-1) {
Home |
Main Index |
Thread Index |
Old Index