Module Name: src
Committed By: snj
Date: Tue Mar 13 16:43:06 UTC 2018
Modified Files:
src/sys/netinet6 [netbsd-6]: ip6_forward.c
Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1518):
sys/netinet6/ip6_forward.c: 1.89-1.90 via patch
Fix use-after-free of mbuf by ip6flow_create
This fixes recent failures of some ATF tests such as t_ipsec_tunnel_odd.
--
Fix use-after-free of mbuf by ip6flow_create (one more)
To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.69.2.1 src/sys/netinet6/ip6_forward.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_forward.c
diff -u src/sys/netinet6/ip6_forward.c:1.69 src/sys/netinet6/ip6_forward.c:1.69.2.1
--- src/sys/netinet6/ip6_forward.c:1.69 Mon Dec 19 11:59:58 2011
+++ src/sys/netinet6/ip6_forward.c Tue Mar 13 16:43:06 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ip6_forward.c,v 1.69 2011/12/19 11:59:58 drochner Exp $ */
+/* $NetBSD: ip6_forward.c,v 1.69.2.1 2018/03/13 16:43:06 snj Exp $ */
/* $KAME: ip6_forward.c,v 1.109 2002/09/11 08:10:17 sakane Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.69 2011/12/19 11:59:58 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.69.2.1 2018/03/13 16:43:06 snj Exp $");
#include "opt_gateway.h"
#include "opt_ipsec.h"
@@ -645,8 +645,8 @@ ip6_forward(struct mbuf *m, int srcrt)
IP6_STATINC(IP6_STAT_REDIRECTSENT);
else {
#ifdef GATEWAY
- if (m->m_flags & M_CANFASTFWD)
- ip6flow_create(&ip6_forward_rt, m);
+ if (mcopy->m_flags & M_CANFASTFWD)
+ ip6flow_create(&ip6_forward_rt, mcopy);
#endif
if (mcopy)
goto freecopy;