Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/gemini NULL deref, found by Mootja; not sure ho...



details:   https://anonhg.NetBSD.org/src/rev/ada35a16d1f0
branches:  trunk
changeset: 824994:ada35a16d1f0
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sun Jun 25 12:44:04 2017 +0000

description:
NULL deref, found by Mootja; not sure how to fix it, so just add a big XXX

diffstat:

 sys/arch/arm/gemini/if_gpn.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (31 lines):

diff -r dd71650538a3 -r ada35a16d1f0 sys/arch/arm/gemini/if_gpn.c
--- a/sys/arch/arm/gemini/if_gpn.c      Sun Jun 25 12:42:40 2017 +0000
+++ b/sys/arch/arm/gemini/if_gpn.c      Sun Jun 25 12:44:04 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_gpn.c,v 1.7 2016/12/15 09:28:02 ozaki-r Exp $ */
+/* $NetBSD: if_gpn.c,v 1.8 2017/06/25 12:44:04 maxv Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -32,7 +32,7 @@
 
 #include "opt_gemini.h"
 
-__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.7 2016/12/15 09:28:02 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_gpn.c,v 1.8 2017/06/25 12:44:04 maxv Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -471,7 +471,12 @@
                        ifp->if_obytes += m->m_len;
                }
                ifp->if_opackets++;
+
+               /*
+                * XXX XXX 'last_gd' could be NULL
+                */
                last_gd->gd_subtype |= GPN_EOF;
+
                sc->sc_txactive++;
                sc->sc_free--;
                gemini_ipm_produce(last_gd, 1);



Home | Main Index | Thread Index | Old Index