Patch "neighbour: Disregard DEAD dst in neigh_update" has been added to the 4.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    neighbour: Disregard DEAD dst in neigh_update

to the 4.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     neighbour-disregard-dead-dst-in-neigh_update.patch
and it can be found in the queue-4.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1853c5593af858c29b813ea34c1edeae62b63c9c
Author: Tong Zhu <zhutong@xxxxxxxxxx>
Date:   Fri Mar 19 14:33:37 2021 -0400

    neighbour: Disregard DEAD dst in neigh_update
    
    [ Upstream commit d47ec7a0a7271dda08932d6208e4ab65ab0c987c ]
    
    After a short network outage, the dst_entry is timed out and put
    in DST_OBSOLETE_DEAD. We are in this code because arp reply comes
    from this neighbour after network recovers. There is a potential
    race condition that dst_entry is still in DST_OBSOLETE_DEAD.
    With that, another neighbour lookup causes more harm than good.
    
    In best case all packets in arp_queue are lost. This is
    counterproductive to the original goal of finding a better path
    for those packets.
    
    I observed a worst case with 4.x kernel where a dst_entry in
    DST_OBSOLETE_DEAD state is associated with loopback net_device.
    It leads to an ethernet header with all zero addresses.
    A packet with all zero source MAC address is quite deadly with
    mac80211, ath9k and 802.11 block ack.  It fails
    ieee80211_find_sta_by_ifaddr in ath9k (xmit.c). Ath9k flushes tx
    queue (ath_tx_complete_aggr). BAW (block ack window) is not
    updated. BAW logic is damaged and ath9k transmission is disabled.
    
    Signed-off-by: Tong Zhu <zhutong@xxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 40d33431bc58..17997902d316 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1234,7 +1234,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;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux