Source-Changes-HG archive

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

[src/netbsd-7-0]: src/sys/netinet6 Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/963dc2af9af0
branches:  netbsd-7-0
changeset: 801435:963dc2af9af0
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Feb 12 18:37:48 2018 +0000

description:
Pull up following revision(s) (requested by ozaki-r in ticket #1551):
        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)

diffstat:

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

diffs (29 lines):

diff -r 096d43aa0cdb -r 963dc2af9af0 sys/netinet6/ip6_forward.c
--- a/sys/netinet6/ip6_forward.c        Sat Feb 10 04:22:10 2018 +0000
+++ b/sys/netinet6/ip6_forward.c        Mon Feb 12 18:37:48 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip6_forward.c,v 1.73.2.1 2015/01/17 12:10:54 martin Exp $      */
+/*     $NetBSD: ip6_forward.c,v 1.73.2.1.2.1 2018/02/12 18:37:48 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.73.2.1 2015/01/17 12:10:54 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_forward.c,v 1.73.2.1.2.1 2018/02/12 18:37:48 snj Exp $");
 
 #include "opt_gateway.h"
 #include "opt_ipsec.h"
@@ -406,8 +406,8 @@
                        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;



Home | Main Index | Thread Index | Old Index