CVS commit: src/tests/kernel
Module Name:src Committed By: pgoyette Date: Sat Feb 3 02:57:15 UTC 2018 Modified Files: src/tests/kernel: t_sysv.c Log Message: * Use 'struct testmsg' rather than 'struct mymsg' (avoids a conflict with FreeBSD) * Fix a broken call to open(2) with O_CREAT and no permission argument. * ANSIfy function definitions. * Improve failure messages. >From freebsd.org via Brooks Davis - Thanks! To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/kernel/t_sysv.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/kernel/t_sysv.c diff -u src/tests/kernel/t_sysv.c:1.4 src/tests/kernel/t_sysv.c:1.5 --- src/tests/kernel/t_sysv.c:1.4 Sun Mar 2 20:13:12 2014 +++ src/tests/kernel/t_sysv.c Sat Feb 3 02:57:15 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: t_sysv.c,v 1.4 2014/03/02 20:13:12 jmmv Exp $ */ +/* $NetBSD: t_sysv.c,v 1.5 2018/02/03 02:57:15 pgoyette Exp $ */ /*- * Copyright (c) 1999, 2007 The NetBSD Foundation, Inc. @@ -72,7 +72,7 @@ void sharer(void); #define MESSAGE_TEXT_LEN 256 -struct mymsg { +struct testmsg { long mtype; char mtext[MESSAGE_TEXT_LEN]; }; @@ -174,7 +174,7 @@ key_t get_ftok(int id) /* Create the file, since ftok() requires it to exist! */ - fd = open(token_key, O_RDWR | O_CREAT | O_EXCL); + fd = open(token_key, O_RDWR | O_CREAT | O_EXCL, 0600); if (fd == -1) { rmdir(tmpdir); atf_tc_fail("open() of temp file failed: %d", errno); @@ -183,6 +183,7 @@ key_t get_ftok(int id) close(fd); key = ftok(token_key, id); + ATF_REQUIRE_MSG(key != (key_t)-1, "ftok() failed"); ATF_REQUIRE_MSG(unlink(token_key) != -1, "unlink() failed: %d", errno); ATF_REQUIRE_MSG(rmdir(token_dir) != -1, "rmdir() failed: %d", errno); @@ -202,7 +203,7 @@ ATF_TC_BODY(msg, tc) { struct sigaction sa; struct msqid_ds m_ds; - struct mymsg m; + struct testmsg m; sigset_t sigmask; int sender_msqid; int loop; @@ -347,9 +348,7 @@ ATF_TC_CLEANUP(msg, tc) } void -print_msqid_ds(mp, mode) - struct msqid_ds *mp; - mode_t mode; +print_msqid_ds(struct msqid_ds *mp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -381,9 +380,9 @@ print_msqid_ds(mp, mode) } void -receiver() +receiver(void) { - struct mymsg m; + struct testmsg m; int msqid, loop; if ((msqid = msgget(msgkey, 0)) == -1) @@ -588,9 +587,7 @@ ATF_TC_CLEANUP(sem, tc) } void -print_semid_ds(sp, mode) - struct semid_ds *sp; - mode_t mode; +print_semid_ds(struct semid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -620,7 +617,7 @@ print_semid_ds(sp, mode) } void -waiter() +waiter(void) { struct sembuf s; int semid; @@ -789,9 +786,7 @@ ATF_TC_CLEANUP(shm, tc) } void -print_shmid_ds(sp, mode) - struct shmid_ds *sp; - mode_t mode; +print_shmid_ds(struct shmid_ds *sp, mode_t mode) { uid_t uid = geteuid(); gid_t gid = getegid(); @@ -819,11 +814,12 @@ print_shmid_ds(sp, mode) ATF_REQUIRE_MSG(sp->shm_perm.gid == gid && sp->shm_perm.cgid == gid, "gid mismatch"); - ATF_REQUIRE_MSG((sp->shm_perm.mode & 0777) == mode, "mode mismatch"); + ATF_REQUIRE_MSG((sp->shm_perm.mode & 0777) == mode, + "mode mismatch %o != %o", sp->shm_perm.mode & 0777, mode); } void -sharer() +sharer(void) { int shmid; void *shm_buf;
CVS commit: src/external/gpl3/gcc
Module Name:src Committed By: mrg Date: Fri Feb 2 20:57:53 UTC 2018 Modified Files: src/external/gpl3/gcc/lib/libgomp: Makefile src/external/gpl3/gcc/usr.bin/include: Makefile src/external/gpl3/gcc/usr.bin/include/sanitizer: Makefile Log Message: install into gcc-6 subdir. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/external/gpl3/gcc/lib/libgomp/Makefile cvs rdiff -u -r1.10 -r1.11 src/external/gpl3/gcc/usr.bin/include/Makefile cvs rdiff -u -r1.1 -r1.2 \ src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/lib/libgomp/Makefile diff -u src/external/gpl3/gcc/lib/libgomp/Makefile:1.16 src/external/gpl3/gcc/lib/libgomp/Makefile:1.17 --- src/external/gpl3/gcc/lib/libgomp/Makefile:1.16 Wed Apr 20 17:18:52 2016 +++ src/external/gpl3/gcc/lib/libgomp/Makefile Fri Feb 2 20:57:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2016/04/20 17:18:52 christos Exp $ +# $NetBSD: Makefile,v 1.17 2018/02/02 20:57:53 mrg Exp $ # build GCC's libgomp, so that -fopenmp works. @@ -77,7 +77,7 @@ FILES= libgomp.spec FILESDIR= ${LIBDIR} INCS= omp.h openacc.h -INCSDIR= /usr/include/gcc-5 +INCSDIR= /usr/include/gcc-6 .endif .else # } else { Index: src/external/gpl3/gcc/usr.bin/include/Makefile diff -u src/external/gpl3/gcc/usr.bin/include/Makefile:1.10 src/external/gpl3/gcc/usr.bin/include/Makefile:1.11 --- src/external/gpl3/gcc/usr.bin/include/Makefile:1.10 Thu Feb 1 21:10:46 2018 +++ src/external/gpl3/gcc/usr.bin/include/Makefile Fri Feb 2 20:57:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.10 2018/02/01 21:10:46 kamil Exp $ +# $NetBSD: Makefile,v 1.11 2018/02/02 20:57:53 mrg Exp $ .include "../Makefile.inc" @@ -25,7 +25,7 @@ mm_malloc.h: ${DIST}/gcc/config/i386/pmm CLEANFILES+= mm_malloc.h .endif -INCSDIR= /usr/include/gcc-5 +INCSDIR= /usr/include/gcc-6 .include .include Index: src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile diff -u src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile:1.1 src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile:1.2 --- src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile:1.1 Thu Feb 1 21:10:46 2018 +++ src/external/gpl3/gcc/usr.bin/include/sanitizer/Makefile Fri Feb 2 20:57:53 2018 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2018/02/01 21:10:46 kamil Exp $ +# $NetBSD: Makefile,v 1.2 2018/02/02 20:57:53 mrg Exp $ .include "../../../Makefile.gcc_path" @@ -19,6 +19,6 @@ INCS+= tsan_interface_atomic.h .include -INCSDIR= /usr/include/gcc-5/sanitizer +INCSDIR= /usr/include/gcc-6/sanitizer .include
CVS commit: src/external/gpl3/gcc/dist
Module Name:src Committed By: mrg Date: Fri Feb 2 20:45:20 UTC 2018 Modified Files: src/external/gpl3/gcc/dist/gcc: common.opt gcc.h system.h src/external/gpl3/gcc/dist/gcc/config: freebsd-spec.h src/external/gpl3/gcc/dist/gcc/doc: cpp.1 cpp.info cppinternals.info g++.1 gcc.1 gcc.info gccinstall.info gccint.info gcov-tool.1 gcov.1 invoke.texi src/external/gpl3/gcc/dist/libgcc: unwind-seh.c Log Message: updates to make it at least build in tools/gcc: - fix -fdelete-null-pointer-checks default (needs more inspection) - revert unnecessary local changes in gcc.h, system.h and freebsd-spec.h - fix local changes to invoke.texi - update man and info pages - fix a typo in unwind-seh.c To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/common.opt \ src/external/gpl3/gcc/dist/gcc/system.h cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/gcc.h cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/dist/gcc/config/freebsd-spec.h cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gcc/dist/gcc/doc/cpp.1 \ src/external/gpl3/gcc/dist/gcc/doc/cppinternals.info \ src/external/gpl3/gcc/dist/gcc/doc/gccinstall.info \ src/external/gpl3/gcc/dist/gcc/doc/gccint.info cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/gcc/doc/cpp.info \ src/external/gpl3/gcc/dist/gcc/doc/g++.1 \ src/external/gpl3/gcc/dist/gcc/doc/gcc.1 \ src/external/gpl3/gcc/dist/gcc/doc/gcc.info \ src/external/gpl3/gcc/dist/gcc/doc/gcov.1 cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gcc/dist/gcc/doc/gcov-tool.1 cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gcc/dist/gcc/doc/invoke.texi cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/dist/libgcc/unwind-seh.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. diffs are larger than 1MB and have been omitted
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 13:14:15 UTC 2018 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket #1525 To generate a diff of this commit: cvs rdiff -u -r1.1.2.125 -r1.1.2.126 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.125 src/doc/CHANGES-6.0.7:1.1.2.126 --- src/doc/CHANGES-6.0.7:1.1.2.125 Fri Feb 2 11:10:30 2018 +++ src/doc/CHANGES-6.0.7 Fri Feb 2 13:14:15 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.125 2018/02/02 11:10:30 martin Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.126 2018/02/02 13:14:15 martin Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -15303,3 +15303,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #1524] +sys/netinet6/nd6_nbr.c1.145 (via patch) + + Fix memory leak. + [maxv, ticket #1525] +
CVS commit: [netbsd-6-0] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 13:12:49 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-6-0]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1525): sys/netinet6/nd6_nbr.c: revision 1.145 (patch) Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.6.1 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.95 src/sys/netinet6/nd6_nbr.c:1.95.6.1 --- src/sys/netinet6/nd6_nbr.c:1.95 Mon Dec 19 11:59:58 2011 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 13:12:49 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.95 2011/12/19 11:59:58 drochner Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.95.6.1 2018/02/02 13:12:49 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.95 2011/12/19 11:59:58 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.95.6.1 2018/02/02 13:12:49 martin Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -589,7 +589,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) - return; /* XXX: impossible */ + goto bad; if (IN6_IS_ADDR_MULTICAST()) { nd6log((LOG_ERR,
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 13:12:15 UTC 2018 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket #1525 To generate a diff of this commit: cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.122 src/doc/CHANGES-6.1.6:1.1.2.123 --- src/doc/CHANGES-6.1.6:1.1.2.122 Fri Feb 2 11:09:12 2018 +++ src/doc/CHANGES-6.1.6 Fri Feb 2 13:12:14 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.122 2018/02/02 11:09:12 martin Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.123 2018/02/02 13:12:14 martin Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -14976,3 +14976,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #1524] +sys/netinet6/nd6_nbr.c1.145 (via patch) + + Fix memory leak. + [maxv, ticket #1525] +
CVS commit: [netbsd-6-1] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 13:11:32 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-6-1]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1525): sys/netinet6/nd6_nbr.c: revision 1.145 (patch) Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.8.1 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.95 src/sys/netinet6/nd6_nbr.c:1.95.8.1 --- src/sys/netinet6/nd6_nbr.c:1.95 Mon Dec 19 11:59:58 2011 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 13:11:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.95 2011/12/19 11:59:58 drochner Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.95.8.1 2018/02/02 13:11:32 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.95 2011/12/19 11:59:58 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.95.8.1 2018/02/02 13:11:32 martin Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -589,7 +589,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) - return; /* XXX: impossible */ + goto bad; if (IN6_IS_ADDR_MULTICAST()) { nd6log((LOG_ERR,
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 13:10:45 UTC 2018 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket #1525 To generate a diff of this commit: cvs rdiff -u -r1.1.2.318 -r1.1.2.319 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.318 src/doc/CHANGES-6.2:1.1.2.319 --- src/doc/CHANGES-6.2:1.1.2.318 Fri Feb 2 11:07:50 2018 +++ src/doc/CHANGES-6.2 Fri Feb 2 13:10:44 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.318 2018/02/02 11:07:50 martin Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.319 2018/02/02 13:10:44 martin Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -21034,3 +21034,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #1524] +sys/netinet6/nd6_nbr.c1.145 (via patch) + + Fix memory leak. + [maxv, ticket #1525] +
CVS commit: [netbsd-6] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 13:10:00 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-6]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1525): sys/netinet6/nd6_nbr.c: revision 1.145 (patch) Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.95.2.1 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.95 src/sys/netinet6/nd6_nbr.c:1.95.2.1 --- src/sys/netinet6/nd6_nbr.c:1.95 Mon Dec 19 11:59:58 2011 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 13:10:00 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.95 2011/12/19 11:59:58 drochner Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.95.2.1 2018/02/02 13:10:00 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.95 2011/12/19 11:59:58 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.95.2.1 2018/02/02 13:10:00 martin Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -589,7 +589,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) - return; /* XXX: impossible */ + goto bad; if (IN6_IS_ADDR_MULTICAST()) { nd6log((LOG_ERR,
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 13:07:09 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1562 To generate a diff of this commit: cvs rdiff -u -r1.1.2.76 -r1.1.2.77 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.76 src/doc/CHANGES-7.0.3:1.1.2.77 --- src/doc/CHANGES-7.0.3:1.1.2.76 Fri Feb 2 11:04:33 2018 +++ src/doc/CHANGES-7.0.3 Fri Feb 2 13:07:09 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.76 2018/02/02 11:04:33 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.77 2018/02/02 13:07:09 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5207,3 +5207,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #1561] +sys/netinet6/nd6_nbr.c1.145 (via patch) + + Fix memory leak. + [maxv, ticket #1562] +
CVS commit: [netbsd-7-0] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 13:06:29 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-7-0]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1562): sys/netinet6/nd6_nbr.c: revision 1.145 (patch) Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.100.2.2 -r1.100.2.2.2.1 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.100.2.2 src/sys/netinet6/nd6_nbr.c:1.100.2.2.2.1 --- src/sys/netinet6/nd6_nbr.c:1.100.2.2 Mon Apr 6 01:32:33 2015 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 13:06:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.100.2.2 2015/04/06 01:32:33 snj Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.100.2.2.2.1 2018/02/02 13:06:29 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.100.2.2 2015/04/06 01:32:33 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.100.2.2.2.1 2018/02/02 13:06:29 martin Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -590,7 +590,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) - return; /* XXX: impossible */ + goto bad; if (IN6_IS_ADDR_MULTICAST()) { nd6log((LOG_ERR,
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 13:05:34 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.2 Log Message: Ticket #1562 To generate a diff of this commit: cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-7.1.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.2 diff -u src/doc/CHANGES-7.1.2:1.1.2.6 src/doc/CHANGES-7.1.2:1.1.2.7 --- src/doc/CHANGES-7.1.2:1.1.2.6 Fri Feb 2 11:02:29 2018 +++ src/doc/CHANGES-7.1.2 Fri Feb 2 13:05:34 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.2,v 1.1.2.6 2018/02/02 11:02:29 martin Exp $ +# $NetBSD: CHANGES-7.1.2,v 1.1.2.7 2018/02/02 13:05:34 martin Exp $ A complete list of changes from the NetBSD 7.1.1 release to the NetBSD 7.1.2 release: @@ -95,3 +95,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #1561] +sys/netinet6/nd6_nbr.c1.145 (via patch) + + Fix memory leak. + [maxv, ticket #1562] +
CVS commit: [netbsd-7-1] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 13:04:53 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-7-1]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1562): sys/netinet6/nd6_nbr.c: revision 1.145 (patch) Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.100.2.2 -r1.100.2.2.6.1 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.100.2.2 src/sys/netinet6/nd6_nbr.c:1.100.2.2.6.1 --- src/sys/netinet6/nd6_nbr.c:1.100.2.2 Mon Apr 6 01:32:33 2015 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 13:04:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.100.2.2 2015/04/06 01:32:33 snj Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.100.2.2.6.1 2018/02/02 13:04:53 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.100.2.2 2015/04/06 01:32:33 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.100.2.2.6.1 2018/02/02 13:04:53 martin Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -590,7 +590,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) - return; /* XXX: impossible */ + goto bad; if (IN6_IS_ADDR_MULTICAST()) { nd6log((LOG_ERR,
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 13:03:46 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: Ticket #1562 To generate a diff of this commit: cvs rdiff -u -r1.1.2.62 -r1.1.2.63 src/doc/CHANGES-7.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.62 src/doc/CHANGES-7.2:1.1.2.63 --- src/doc/CHANGES-7.2:1.1.2.62 Fri Feb 2 10:59:30 2018 +++ src/doc/CHANGES-7.2 Fri Feb 2 13:03:46 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.62 2018/02/02 10:59:30 martin Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.63 2018/02/02 13:03:46 martin Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -5078,3 +5078,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #1561] +sys/netinet6/nd6_nbr.c1.145 (via patch) + + Fix memory leak. + [maxv, ticket #1562] +
CVS commit: [netbsd-7] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 13:03:05 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-7]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1562): sys/netinet6/nd6_nbr.c: revision 1.145 Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.100.2.2 -r1.100.2.3 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.100.2.2 src/sys/netinet6/nd6_nbr.c:1.100.2.3 --- src/sys/netinet6/nd6_nbr.c:1.100.2.2 Mon Apr 6 01:32:33 2015 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 13:03:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.100.2.2 2015/04/06 01:32:33 snj Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.100.2.3 2018/02/02 13:03:05 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.100.2.2 2015/04/06 01:32:33 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.100.2.3 2018/02/02 13:03:05 martin Exp $"); #include "opt_inet.h" #include "opt_ipsec.h" @@ -590,7 +590,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) - return; /* XXX: impossible */ + goto bad; if (IN6_IS_ADDR_MULTICAST()) { nd6log((LOG_ERR,
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 12:56:22 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Ticket #531 To generate a diff of this commit: cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.111 src/doc/CHANGES-8.0:1.1.2.112 --- src/doc/CHANGES-8.0:1.1.2.111 Fri Feb 2 10:55:10 2018 +++ src/doc/CHANGES-8.0 Fri Feb 2 12:56:22 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.111 2018/02/02 10:55:10 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.112 2018/02/02 12:56:22 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -9346,3 +9346,8 @@ sys/netinet6/ip6_mroute.c 1.120 Fix a use-after-free in the Pim6 entry point. [maxv, ticket #530] +sys/netinet6/nd6_nbr.c1.145 + + Fix memory leak. + [maxv, ticket #531] +
CVS commit: [netbsd-8] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 12:55:08 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-8]: nd6_nbr.c Log Message: Pull up following revision(s) (requested by maxv in ticket #531): sys/netinet6/nd6_nbr.c: revision 1.145 Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.138.6.2 -r1.138.6.3 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.138.6.2 src/sys/netinet6/nd6_nbr.c:1.138.6.3 --- src/sys/netinet6/nd6_nbr.c:1.138.6.2 Fri Jan 26 15:41:12 2018 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 12:55:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.138.6.2 2018/01/26 15:41:12 martin Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.138.6.3 2018/02/02 12:55:08 martin Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.138.6.2 2018/01/26 15:41:12 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.138.6.3 2018/02/02 12:55:08 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -607,8 +607,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) { - m_put_rcvif_psref(ifp, ); - return; /* XXX: impossible */ + goto bad; } if (IN6_IS_ADDR_MULTICAST()) {
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 11:10:30 UTC 2018 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket #1524 To generate a diff of this commit: cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.124 src/doc/CHANGES-6.0.7:1.1.2.125 --- src/doc/CHANGES-6.0.7:1.1.2.124 Tue Jan 30 18:48:17 2018 +++ src/doc/CHANGES-6.0.7 Fri Feb 2 11:10:30 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.124 2018/01/30 18:48:17 martin Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.125 2018/02/02 11:10:30 martin Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -15298,3 +15298,8 @@ sys/netinet6/ipcomp_input.c adjust oth Fix a memory corruption in ip6_get_prevhdr(). [maxv, ticket #1523] +sys/netinet6/ip6_mroute.c 1.120 + + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #1524] +
CVS commit: [netbsd-6-0] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 11:09:52 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-6-0]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1524): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.103.8.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.103 src/sys/netinet6/ip6_mroute.c:1.103.8.1 --- src/sys/netinet6/ip6_mroute.c:1.103 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 11:09:52 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.103.8.1 2018/02/02 11:09:52 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103.8.1 2018/02/02 11:09:52 martin Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -1864,7 +1864,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 11:09:12 UTC 2018 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket #1524 To generate a diff of this commit: cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.121 src/doc/CHANGES-6.1.6:1.1.2.122 --- src/doc/CHANGES-6.1.6:1.1.2.121 Tue Jan 30 18:46:45 2018 +++ src/doc/CHANGES-6.1.6 Fri Feb 2 11:09:12 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.121 2018/01/30 18:46:45 martin Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.122 2018/02/02 11:09:12 martin Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -14971,3 +14971,8 @@ sys/netinet6/ipcomp_input.c adjust oth Fix a memory corruption in ip6_get_prevhdr(). [maxv, ticket #1523] +sys/netinet6/ip6_mroute.c 1.120 + + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #1524] +
CVS commit: [netbsd-6-1] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 11:08:30 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-6-1]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1524): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.103.16.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.103 src/sys/netinet6/ip6_mroute.c:1.103.16.1 --- src/sys/netinet6/ip6_mroute.c:1.103 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 11:08:30 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.103.16.1 2018/02/02 11:08:30 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103.16.1 2018/02/02 11:08:30 martin Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -1864,7 +1864,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 11:07:50 UTC 2018 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket #1524 To generate a diff of this commit: cvs rdiff -u -r1.1.2.317 -r1.1.2.318 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.317 src/doc/CHANGES-6.2:1.1.2.318 --- src/doc/CHANGES-6.2:1.1.2.317 Tue Jan 30 18:45:16 2018 +++ src/doc/CHANGES-6.2 Fri Feb 2 11:07:50 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.317 2018/01/30 18:45:16 martin Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.318 2018/02/02 11:07:50 martin Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -21029,3 +21029,8 @@ sys/netinet6/ipcomp_input.c adjust oth [maxv, ticket #1523] +sys/netinet6/ip6_mroute.c 1.120 + + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #1524] +
CVS commit: [netbsd-6] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 11:07:12 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-6]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1524): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.103 -r1.103.2.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.103 src/sys/netinet6/ip6_mroute.c:1.103.2.1 --- src/sys/netinet6/ip6_mroute.c:1.103 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 11:07:12 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.103.2.1 2018/02/02 11:07:12 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103 2011/12/31 20:41:59 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.103.2.1 2018/02/02 11:07:12 martin Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -1864,7 +1864,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: [netbsd-7-0] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 11:04:33 UTC 2018 Modified Files: src/doc [netbsd-7-0]: CHANGES-7.0.3 Log Message: Ticket #1561 To generate a diff of this commit: cvs rdiff -u -r1.1.2.75 -r1.1.2.76 src/doc/CHANGES-7.0.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0.3 diff -u src/doc/CHANGES-7.0.3:1.1.2.75 src/doc/CHANGES-7.0.3:1.1.2.76 --- src/doc/CHANGES-7.0.3:1.1.2.75 Tue Jan 30 18:32:34 2018 +++ src/doc/CHANGES-7.0.3 Fri Feb 2 11:04:33 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0.3,v 1.1.2.75 2018/01/30 18:32:34 martin Exp $ +# $NetBSD: CHANGES-7.0.3,v 1.1.2.76 2018/02/02 11:04:33 martin Exp $ A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3 release: @@ -5203,3 +5203,7 @@ sys/netinet6/raw_ip6.c1.160 (via pat Fix a memory corruption in ip6_get_prevhdr(). [maxv, ticket #1560] +sys/netinet6/ip6_mroute.c 1.120 + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #1561] +
CVS commit: [netbsd-7-0] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 11:03:53 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-7-0]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1561): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.107.6.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.107 src/sys/netinet6/ip6_mroute.c:1.107.6.1 --- src/sys/netinet6/ip6_mroute.c:1.107 Sat May 17 21:26:20 2014 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 11:03:53 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.107 2014/05/17 21:26:20 rmind Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.107.6.1 2018/02/02 11:03:53 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.107 2014/05/17 21:26:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.107.6.1 2018/02/02 11:03:53 martin Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -1861,7 +1861,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: [netbsd-7-1] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 11:02:29 UTC 2018 Modified Files: src/doc [netbsd-7-1]: CHANGES-7.1.2 Log Message: Ticket #1561 To generate a diff of this commit: cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-7.1.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.1.2 diff -u src/doc/CHANGES-7.1.2:1.1.2.5 src/doc/CHANGES-7.1.2:1.1.2.6 --- src/doc/CHANGES-7.1.2:1.1.2.5 Tue Jan 30 18:31:12 2018 +++ src/doc/CHANGES-7.1.2 Fri Feb 2 11:02:29 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.1.2,v 1.1.2.5 2018/01/30 18:31:12 martin Exp $ +# $NetBSD: CHANGES-7.1.2,v 1.1.2.6 2018/02/02 11:02:29 martin Exp $ A complete list of changes from the NetBSD 7.1.1 release to the NetBSD 7.1.2 release: @@ -91,3 +91,7 @@ sys/netinet6/raw_ip6.c1.160 (via pat Fix a memory corruption in ip6_get_prevhdr(). [maxv, ticket #1560] +sys/netinet6/ip6_mroute.c 1.120 + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #1561] +
CVS commit: [netbsd-7-1] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 11:01:46 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-7-1]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1561): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.107.10.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.107 src/sys/netinet6/ip6_mroute.c:1.107.10.1 --- src/sys/netinet6/ip6_mroute.c:1.107 Sat May 17 21:26:20 2014 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 11:01:46 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.107 2014/05/17 21:26:20 rmind Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.107.10.1 2018/02/02 11:01:46 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.107 2014/05/17 21:26:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.107.10.1 2018/02/02 11:01:46 martin Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -1861,7 +1861,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Fri Feb 2 10:49:01 UTC 2018 Modified Files: src/sys/netinet6: nd6_nbr.c Log Message: Fix memory leak. Contrary to what the XXX indicates, this place is 100% reachable remotely. To generate a diff of this commit: cvs rdiff -u -r1.144 -r1.145 src/sys/netinet6/nd6_nbr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/nd6_nbr.c diff -u src/sys/netinet6/nd6_nbr.c:1.144 src/sys/netinet6/nd6_nbr.c:1.145 --- src/sys/netinet6/nd6_nbr.c:1.144 Tue Jan 16 08:13:47 2018 +++ src/sys/netinet6/nd6_nbr.c Fri Feb 2 10:49:01 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_nbr.c,v 1.144 2018/01/16 08:13:47 ozaki-r Exp $ */ +/* $NetBSD: nd6_nbr.c,v 1.145 2018/02/02 10:49:01 maxv Exp $ */ /* $KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.144 2018/01/16 08:13:47 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.145 2018/02/02 10:49:01 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -607,8 +607,7 @@ nd6_na_input(struct mbuf *m, int off, in taddr6 = nd_na->nd_na_target; if (in6_setscope(, ifp, NULL)) { - m_put_rcvif_psref(ifp, ); - return; /* XXX: impossible */ + goto bad; } if (IN6_IS_ADDR_MULTICAST()) {
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 10:59:31 UTC 2018 Modified Files: src/doc [netbsd-7]: CHANGES-7.2 Log Message: Ticket #1561 To generate a diff of this commit: cvs rdiff -u -r1.1.2.61 -r1.1.2.62 src/doc/CHANGES-7.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.2 diff -u src/doc/CHANGES-7.2:1.1.2.61 src/doc/CHANGES-7.2:1.1.2.62 --- src/doc/CHANGES-7.2:1.1.2.61 Tue Jan 30 18:29:25 2018 +++ src/doc/CHANGES-7.2 Fri Feb 2 10:59:30 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.2,v 1.1.2.61 2018/01/30 18:29:25 martin Exp $ +# $NetBSD: CHANGES-7.2,v 1.1.2.62 2018/02/02 10:59:30 martin Exp $ A complete list of changes from the NetBSD 7.1 release to the NetBSD 7.2 release: @@ -5074,3 +5074,7 @@ sys/netinet6/raw_ip6.c1.160 (via pat Fix a memory corruption in ip6_get_prevhdr(). [maxv, ticket #1560] +sys/netinet6/ip6_mroute.c 1.120 + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #1561] +
CVS commit: [netbsd-8] src/doc
Module Name:src Committed By: martin Date: Fri Feb 2 10:55:10 UTC 2018 Modified Files: src/doc [netbsd-8]: CHANGES-8.0 Log Message: Ticket #530 To generate a diff of this commit: cvs rdiff -u -r1.1.2.110 -r1.1.2.111 src/doc/CHANGES-8.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-8.0 diff -u src/doc/CHANGES-8.0:1.1.2.110 src/doc/CHANGES-8.0:1.1.2.111 --- src/doc/CHANGES-8.0:1.1.2.110 Wed Jan 31 19:40:52 2018 +++ src/doc/CHANGES-8.0 Fri Feb 2 10:55:10 2018 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-8.0,v 1.1.2.110 2018/01/31 19:40:52 martin Exp $ +# $NetBSD: CHANGES-8.0,v 1.1.2.111 2018/02/02 10:55:10 martin Exp $ A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04 until the 8.0 release: @@ -9340,3 +9340,9 @@ doc/3RDPARTY 1.1496 (via patch) Import tzdata2018c. [kre, ticket #513] + +sys/netinet6/ip6_mroute.c 1.120 + + Fix a use-after-free in the Pim6 entry point. + [maxv, ticket #530] +
CVS commit: [netbsd-7] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 10:58:44 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-7]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1561): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.107.2.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.107 src/sys/netinet6/ip6_mroute.c:1.107.2.1 --- src/sys/netinet6/ip6_mroute.c:1.107 Sat May 17 21:26:20 2014 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 10:58:44 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.107 2014/05/17 21:26:20 rmind Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.107.2.1 2018/02/02 10:58:44 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.107 2014/05/17 21:26:20 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.107.2.1 2018/02/02 10:58:44 martin Exp $"); #include "opt_inet.h" #include "opt_mrouting.h" @@ -1861,7 +1861,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: [netbsd-8] src/sys/netinet6
Module Name:src Committed By: martin Date: Fri Feb 2 10:54:02 UTC 2018 Modified Files: src/sys/netinet6 [netbsd-8]: ip6_mroute.c Log Message: Pull up following revision(s) (requested by maxv in ticket #530): sys/netinet6/ip6_mroute.c: revision 1.120 Fix a pretty simple, yet pretty tragic typo: we should return IPPROTO_DONE, not IPPROTO_NONE. With IPPROTO_NONE we will keep parsing the header chain on an mbuf that was already freed. To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.119.6.1 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.119 src/sys/netinet6/ip6_mroute.c:1.119.6.1 --- src/sys/netinet6/ip6_mroute.c:1.119 Wed Mar 1 08:54:12 2017 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 10:54:02 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.119 2017/03/01 08:54:12 ozaki-r Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.119.6.1 2018/02/02 10:54:02 martin Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.119 2017/03/01 08:54:12 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.119.6.1 2018/02/02 10:54:02 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1886,7 +1886,7 @@ pim6_input(struct mbuf **mp, int *offp, (eip6->ip6_vfc & IPV6_VERSION)); #endif m_freem(m); - return (IPPROTO_NONE); + return (IPPROTO_DONE); } /* verify the inner packet is destined to a mcast group */
CVS commit: src/sys/netinet6
Module Name:src Committed By: maxv Date: Fri Feb 2 09:01:17 UTC 2018 Modified Files: src/sys/netinet6: ip6_mroute.c Log Message: Style, no functional change. To generate a diff of this commit: cvs rdiff -u -r1.120 -r1.121 src/sys/netinet6/ip6_mroute.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/netinet6/ip6_mroute.c diff -u src/sys/netinet6/ip6_mroute.c:1.120 src/sys/netinet6/ip6_mroute.c:1.121 --- src/sys/netinet6/ip6_mroute.c:1.120 Fri Feb 2 06:23:45 2018 +++ src/sys/netinet6/ip6_mroute.c Fri Feb 2 09:01:17 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: ip6_mroute.c,v 1.120 2018/02/02 06:23:45 maxv Exp $ */ +/* $NetBSD: ip6_mroute.c,v 1.121 2018/02/02 09:01:17 maxv Exp $ */ /* $KAME: ip6_mroute.c,v 1.49 2001/07/25 09:21:18 jinmei Exp $ */ /* @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.120 2018/02/02 06:23:45 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip6_mroute.c,v 1.121 2018/02/02 09:01:17 maxv Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -162,8 +162,7 @@ static int ip6_mdq(struct mbuf *, struct static void phyint_send(struct ip6_hdr *, struct mif6 *, struct mbuf *); static int set_pim6(int *); -static int socket_send(struct socket *, struct mbuf *, - struct sockaddr_in6 *); +static int socket_send(struct socket *, struct mbuf *, struct sockaddr_in6 *); static int register_send(struct ip6_hdr *, struct mif6 *, struct mbuf *); /* @@ -376,7 +375,8 @@ ip6_mrouter_get(struct socket *so, struc { int error; - if (so != ip6_mrouter) return EACCES; + if (so != ip6_mrouter) + return EACCES; error = 0; @@ -479,13 +479,13 @@ ip6_mrouter_init(struct socket *so, int if (so->so_type != SOCK_RAW || so->so_proto->pr_protocol != IPPROTO_ICMPV6) - return (EOPNOTSUPP); + return EOPNOTSUPP; if (v != 1) - return (ENOPROTOOPT); + return ENOPROTOOPT; if (ip6_mrouter != NULL) - return (EADDRINUSE); + return EADDRINUSE; ip6_mrouter = so; ip6_mrouter_ver = cmd; @@ -591,7 +591,7 @@ ip6_mrouter_done(void) if_detach(_register_if6); reg_mif_num = (mifi_t)-1; } - + ip6_mrouter = NULL; ip6_mrouter_ver = 0; @@ -639,7 +639,6 @@ ip6_mrouter_detach(struct ifnet *ifp) } } - /* * Add a mif to the mif table */ @@ -666,16 +665,14 @@ add_m6if(struct mif6ctl *mifcp) ifp = _register_if6; if (reg_mif_num == (mifi_t)-1) { - strlcpy(ifp->if_xname, "register_mif", + strlcpy(ifp->if_xname, "register_mif", sizeof(ifp->if_xname)); ifp->if_flags |= IFF_LOOPBACK; ifp->if_index = mifcp->mif6c_mifi; reg_mif_num = mifcp->mif6c_mifi; if_attach(ifp); } - - } /* if REGISTER */ - else { + } else { /* Make sure the interface supports multicast */ if ((ifp->if_flags & IFF_MULTICAST) == 0) return EOPNOTSUPP; @@ -869,7 +866,7 @@ add_m6fc(struct mf6cctl *mfccp) m_freem(rte->m); #ifdef UPCALL_TIMING collate(&(rte->t)); -#endif /* UPCALL_TIMING */ +#endif free(rte, M_MRTABLE); rte = n; } @@ -916,8 +913,7 @@ add_m6fc(struct mf6cctl *mfccp) } if (rt == NULL) { /* no upcall, so make a new entry */ - rt = (struct mf6c *)malloc(sizeof(*rt), M_MRTABLE, - M_NOWAIT); + rt = malloc(sizeof(*rt), M_MRTABLE, M_NOWAIT); if (rt == NULL) { splx(s); return ENOBUFS; @@ -1045,7 +1041,6 @@ socket_send(struct socket *s, struct mbu * erroneous, in which case a non-zero return value tells the caller to * discard it. */ - int ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) { @@ -1106,23 +1101,21 @@ ip6_mforward(struct ip6_hdr *ip6, struct /* Entry exists, so forward if necessary */ if (rt) { splx(s); - return (ip6_mdq(m, ifp, rt)); + return ip6_mdq(m, ifp, rt); } else { /* - * If we don't have a route for packet's origin, - * Make a copy of the packet & - * send message to routing daemon + * If we don't have a route for packet's origin, make a copy + * of the packet and send message to routing daemon. */ struct mbuf *mb0; struct rtdetq *rte; u_long hash; -/* int i, npkts;*/ + #ifdef UPCALL_TIMING struct timeval tp; - GET_TIME(tp); -#endif /* UPCALL_TIMING */ +#endif mrt6stat.mrt6s_no_route++; #ifdef MRT6DEBUG @@ -1136,13 +1129,13 @@ ip6_mforward(struct ip6_hdr *ip6, struct * Allocate mbufs early so that we don't do extra work if we * are just going to fail anyway. */ - rte = (struct rtdetq *)malloc(sizeof(*rte), M_MRTABLE, - M_NOWAIT); + rte = malloc(sizeof(*rte), M_MRTABLE, M_NOWAIT); if (rte == NULL) { splx(s); return ENOBUFS; } mb0 = m_copy(m, 0, M_COPYALL); + /* * Pullup packet header if needed before storing it, * as other references may modify it in the meantime. @@ -1172,14 +1165,14 @@ ip6_mforward(struct ip6_hdr *ip6, struct struct omrt6msg *oim; /* no upcall, so make a new entry