From owner-svn-src-head@freebsd.org Fri Feb 17 23:20:24 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1AE3ACE32E3; Fri, 17 Feb 2017 23:20:24 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5B751F9A; Fri, 17 Feb 2017 23:20:23 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v1HNKMLK066052; Fri, 17 Feb 2017 23:20:22 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v1HNKMvU066049; Fri, 17 Feb 2017 23:20:22 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201702172320.v1HNKMvU066049@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Fri, 17 Feb 2017 23:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313906 - in head/sys/dev: iwi ral usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Feb 2017 23:20:24 -0000 Author: avos Date: Fri Feb 17 23:20:22 2017 New Revision: 313906 URL: https://svnweb.freebsd.org/changeset/base/313906 Log: iwi, ral, zyd: fix possible use-after-free. MFC after: 5 days Modified: head/sys/dev/iwi/if_iwi.c head/sys/dev/ral/rt2661.c head/sys/dev/usb/wlan/if_zyd.c Modified: head/sys/dev/iwi/if_iwi.c ============================================================================== --- head/sys/dev/iwi/if_iwi.c Fri Feb 17 22:51:34 2017 (r313905) +++ head/sys/dev/iwi/if_iwi.c Fri Feb 17 23:20:22 2017 (r313906) @@ -1979,9 +1979,9 @@ iwi_start(struct iwi_softc *sc) } ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (iwi_tx_start(sc, m, ni, ac) != 0) { - ieee80211_free_node(ni); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); break; } sc->sc_tx_timer = 5; Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Fri Feb 17 22:51:34 2017 (r313905) +++ head/sys/dev/ral/rt2661.c Fri Feb 17 23:20:22 2017 (r313906) @@ -1616,9 +1616,9 @@ rt2661_start(struct rt2661_softc *sc) } ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; if (rt2661_tx_data(sc, m, ni, ac) != 0) { - ieee80211_free_node(ni); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); break; } sc->sc_tx_timer = 5; Modified: head/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- head/sys/dev/usb/wlan/if_zyd.c Fri Feb 17 22:51:34 2017 (r313905) +++ head/sys/dev/usb/wlan/if_zyd.c Fri Feb 17 23:20:22 2017 (r313906) @@ -2582,10 +2582,10 @@ zyd_start(struct zyd_softc *sc) while (sc->tx_nfree > 0 && (m = mbufq_dequeue(&sc->sc_snd)) != NULL) { ni = (struct ieee80211_node *)m->m_pkthdr.rcvif; if (zyd_tx_start(sc, m, ni) != 0) { - ieee80211_free_node(ni); m_freem(m); if_inc_counter(ni->ni_vap->iv_ifp, IFCOUNTER_OERRORS, 1); + ieee80211_free_node(ni); break; } }