Module Name: src Committed By: snj Date: Tue Aug 4 21:16:43 UTC 2015
Modified Files: src/sys/dev/pci [netbsd-7]: if_et.c Log Message: Pull up following revision(s) (requested by maxv in ticket #914): sys/dev/pci/if_et.c: revision 1.9 Use-after-free. ok christos@ Found by Brainy. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.8.4.1 src/sys/dev/pci/if_et.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/dev/pci/if_et.c diff -u src/sys/dev/pci/if_et.c:1.8 src/sys/dev/pci/if_et.c:1.8.4.1 --- src/sys/dev/pci/if_et.c:1.8 Sat Mar 29 19:28:24 2014 +++ src/sys/dev/pci/if_et.c Tue Aug 4 21:16:43 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_et.c,v 1.8 2014/03/29 19:28:24 christos Exp $ */ +/* $NetBSD: if_et.c,v 1.8.4.1 2015/08/04 21:16:43 snj Exp $ */ /* $OpenBSD: if_et.c,v 1.11 2008/06/08 06:18:07 jsg Exp $ */ /* * Copyright (c) 2007 The DragonFly Project. All rights reserved. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.8 2014/03/29 19:28:24 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.8.4.1 2015/08/04 21:16:43 snj Exp $"); #include "opt_inet.h" #include "vlan.h" @@ -1823,7 +1823,6 @@ et_encap(struct et_softc *sc, struct mbu MGETHDR(m_new, M_DONTWAIT, MT_DATA); if (m_new == NULL) { - m_freem(m); aprint_error_dev(sc->sc_dev, "can't defrag TX mbuf\n"); error = ENOBUFS; goto back; @@ -1833,7 +1832,6 @@ et_encap(struct et_softc *sc, struct mbu if (m->m_pkthdr.len > MHLEN) { MCLGET(m_new, M_DONTWAIT); if (!(m_new->m_flags & M_EXT)) { - m_freem(m); m_freem(m_new); error = ENOBUFS; }