public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] neighbour: Disregard DEAD dst in neigh_update
@ 2020-12-30 22:54 Tong Zhu
  2021-01-06  0:05 ` David Miller
  0 siblings, 1 reply; 4+ messages in thread
From: Tong Zhu @ 2020-12-30 22:54 UTC (permalink / raw)
  To: davem, sashal, edumazet, zhutong, vvs; +Cc: netdev, stable, linux-kernel

In 4.x kernel a dst in DST_OBSOLETE_DEAD state is associated
with loopback net_device and leads to loopback neighbour. It
leads to an ethernet header with all zero addresses.

A very troubling case is working with mac80211 and ath9k.
A packet with all zero source MAC address to mac80211 will
eventually fail ieee80211_find_sta_by_ifaddr in ath9k (xmit.c).
As result, ath9k flushes tx queue (ath_tx_complete_aggr) without
updating baw (block ack window), damages baw logic and disables
transmission.

Signed-off-by: Tong Zhu <zhutong@amazon.com>
---
 net/core/neighbour.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 6e890f51b7d8..e471c32e448f 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1271,7 +1271,7 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
 			 * we can reinject the packet there.
 			 */
 			n2 = NULL;
-			if (dst) {
+			if (dst && dst->obsolete != DST_OBSOLETE_DEAD) {
 				n2 = dst_neigh_lookup_skb(dst, skb);
 				if (n2)
 					n1 = n2;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-08  7:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-12-30 22:54 [PATCH] neighbour: Disregard DEAD dst in neigh_update Tong Zhu
2021-01-06  0:05 ` David Miller
2021-01-08  2:36   ` Your Real Name
2021-01-08  7:34     ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox