Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet Fix PR security/54881. Pointed out by ohishi@II...



details:   https://anonhg.NetBSD.org/src/rev/8e582af67a20
branches:  trunk
changeset: 848279:8e582af67a20
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Jan 23 09:09:59 2020 +0000

description:
Fix PR security/54881.  Pointed out by ohishi@IIJ, thanks.

diffstat:

 sys/netinet/ip_encap.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (33 lines):

diff -r 95c57c0f1226 -r 8e582af67a20 sys/netinet/ip_encap.c
--- a/sys/netinet/ip_encap.c    Thu Jan 23 07:49:57 2020 +0000
+++ b/sys/netinet/ip_encap.c    Thu Jan 23 09:09:59 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_encap.c,v 1.71 2019/05/15 03:33:41 knakahara Exp $  */
+/*     $NetBSD: ip_encap.c,v 1.72 2020/01/23 09:09:59 knakahara Exp $  */
 /*     $KAME: ip_encap.c,v 1.73 2001/10/02 08:30:58 itojun Exp $       */
 
 /*
@@ -68,7 +68,7 @@
 #define USE_RADIX
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.71 2019/05/15 03:33:41 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_encap.c,v 1.72 2020/01/23 09:09:59 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_mrouting.h"
@@ -884,10 +884,11 @@
                        */
                        match = encap6_lookup(m, off, nxt, OUTBOUND,
                            &elem_psref);
-                       if (match)
+                       if (match) {
                                valid++;
-                       psref_release(&elem_psref, &match->psref,
-                           encaptab.elem_class);
+                               psref_release(&elem_psref, &match->psref,
+                                   encaptab.elem_class);
+                       }
 
                        /*
                        * Depending on the value of "valid" and routing table



Home | Main Index | Thread Index | Old Index