lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090515040904.GA32357@hash.localnet>
Date:	Fri, 15 May 2009 00:09:04 -0400
From:	Bob Copeland <me@...copeland.com>
To:	Sitsofe Wheeler <sitsofe@...oo.com>
Cc:	Jiri Slaby <jirislaby@...il.com>,
	Nick Kossifidis <mickflemm@...il.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	linux-kernel@...r.kernel.org, linux-wireless@...r.kernel.org,
	ath5k-devel@...ema.h4ckr.net,
	"Luis R. Rodriguez" <lrodriguez@...eros.com>
Subject: Re: [TIP] BUG kmalloc-4096: Poison overwritten (ath5k_rx_skb_alloc)

On Wed, May 13, 2009 at 10:44:17PM +0100, Sitsofe Wheeler wrote:
> Could you repost the patches you wanted me to test with against the
> latest kernel?

This is too ugly to live, but I'd like to know if you can reproduce
with this patch.  If it still happens, then I guess it's back to
debugging patches.  I'd love to be able to replicate this here :(

diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index a08bc8a..e01da34 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -1143,6 +1143,13 @@ struct sk_buff *ath5k_rx_skb_alloc(struct ath5k_softc *sc, dma_addr_t *skb_addr)
 }
 
 static int
+ath5k_rxbuf_requeue(struct ath5k_softc *sc, struct ath5k_buf *bf)
+{
+	list_move_tail(&bf->list, &sc->rxbuf);
+	return ath5k_rxbuf_setup(sc, bf);
+}
+
+static int
 ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
 {
 	struct ath5k_hw *ah = sc->ah;
@@ -1751,7 +1758,7 @@ ath5k_tasklet_rx(unsigned long data)
 		goto unlock;
 	}
 	bf_last = list_entry(sc->rxbuf.prev, struct ath5k_buf, list);
-	do {
+	for (;;) {
 		rxs.flag = 0;
 
 		bf = list_first_entry(&sc->rxbuf, struct ath5k_buf, list);
@@ -1904,13 +1911,18 @@ accept:
 		if (sc->opmode == NL80211_IFTYPE_ADHOC)
 			ath5k_check_ibss_tsf(sc, skb, &rxs);
 
-		__ieee80211_rx(sc->hw, skb, &rxs);
-
 		bf->skb = next_skb;
 		bf->skbaddr = next_skb_addr;
+		if (ath5k_rxbuf_requeue(sc, bf))
+			break;
+
+		__ieee80211_rx(sc->hw, skb, &rxs);
+		continue;
 next:
-		list_move_tail(&bf->list, &sc->rxbuf);
-	} while (ath5k_rxbuf_setup(sc, bf) == 0);
+		if (ath5k_rxbuf_requeue(sc, bf))
+			break;
+	}
+
 unlock:
 	spin_unlock(&sc->rxbuflock);
 }

-- 
Bob Copeland %% www.bobcopeland.com

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ