Date: Fri, 24 Feb 2017 21:19:40 +0000 (UTC) From: Andriy Voskoboinyk <avos@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r314222 - in stable/11/sys/dev: iwi ral usb/wlan Message-ID: <201702242119.v1OLJeIo063136@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: avos Date: Fri Feb 24 21:19:40 2017 New Revision: 314222 URL: https://svnweb.freebsd.org/changeset/base/314222 Log: MFC r313906: iwi, ral, zyd: fix possible use-after-free. Modified: stable/11/sys/dev/iwi/if_iwi.c stable/11/sys/dev/ral/rt2661.c stable/11/sys/dev/usb/wlan/if_zyd.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/iwi/if_iwi.c ============================================================================== --- stable/11/sys/dev/iwi/if_iwi.c Fri Feb 24 20:51:39 2017 (r314221) +++ stable/11/sys/dev/iwi/if_iwi.c Fri Feb 24 21:19:40 2017 (r314222) @@ -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: stable/11/sys/dev/ral/rt2661.c ============================================================================== --- stable/11/sys/dev/ral/rt2661.c Fri Feb 24 20:51:39 2017 (r314221) +++ stable/11/sys/dev/ral/rt2661.c Fri Feb 24 21:19:40 2017 (r314222) @@ -1619,9 +1619,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: stable/11/sys/dev/usb/wlan/if_zyd.c ============================================================================== --- stable/11/sys/dev/usb/wlan/if_zyd.c Fri Feb 24 20:51:39 2017 (r314221) +++ stable/11/sys/dev/usb/wlan/if_zyd.c Fri Feb 24 21:19:40 2017 (r314222) @@ -2570,10 +2570,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; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702242119.v1OLJeIo063136>