Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/netinet6 Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/4388bfc25c77
branches:  netbsd-8
changeset: 851274:4388bfc25c77
user:      snj <snj%NetBSD.org@localhost>
date:      Tue Jan 09 19:30:45 2018 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #484):
        sys/netinet6/ip6_forward.c: 1.89-1.90
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)

diffstat:

 sys/netinet6/ip6_forward.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r e8a6034d90ea -r 4388bfc25c77 sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c        Tue Jan 09 19:29:02 2018 +0000
+++ b/sys/netinet6/ip6_forward.c        Tue Jan 09 19:30:45 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_forward.c,v 1.87.2.1 2017/10/21 19:43:54 snj Exp $ */
+/*     $NetBSD: ip6_forward.c,v 1.87.2.2 2018/01/09 19:30:45 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.87.2.1 2017/10/21 19:43:54 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.87.2.2 2018/01/09 19:30:45 snj Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -415,8 +415,8 @@
                        /* Need to release rt here */
                        rtcache_unref(rt, ro);
                        rt = NULL;
-                       if (m->m_flags & M_CANFASTFWD)
-                               ip6flow_create(ro, m);
+                       if (mcopy->m_flags & M_CANFASTFWD)
+                               ip6flow_create(ro, mcopy);
 #endif
                        if (mcopy)
                                goto freecopy;



Home | Main Index | Thread Index | Old Index