Patch "net: warn if gso_type isn't set for a GSO SKB" has been added to the 5.10-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

    net: warn if gso_type isn't set for a GSO SKB

to the 5.10-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:
     net-warn-if-gso_type-isn-t-set-for-a-gso-skb.patch
and it can be found in the queue-5.10 subdirectory.

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



commit aaf62dd7819e63cd17e9c5254fc7f5cdc70bab72
Author: Heiner Kallweit <hkallweit1@xxxxxxxxx>
Date:   Sat Nov 21 00:22:20 2020 +0100

    net: warn if gso_type isn't set for a GSO SKB
    
    [ Upstream commit 1d155dfdf50efc2b0793bce93c06d1a5b23d0877 ]
    
    In bug report [0] a warning in r8169 driver was reported that was
    caused by an invalid GSO SKB (gso_type was 0). See [1] for a discussion
    about this issue. Still the origin of the invalid GSO SKB isn't clear.
    
    It shouldn't be a network drivers task to check for invalid GSO SKB's.
    Also, even if issue [0] can be fixed, we can't be sure that a
    similar issue doesn't pop up again at another place.
    Therefore let gso_features_check() check for such invalid GSO SKB's.
    
    [0] https://bugzilla.kernel.org/show_bug.cgi?id=209423
    [1] https://www.spinics.net/lists/netdev/msg690794.html
    
    Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
    Link: https://lore.kernel.org/r/97c78d21-7f0b-d843-df17-3589f224d2cf@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Stable-dep-of: 24ab059d2ebd ("net: check dev->gso_max_size in gso_features_check()")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/core/dev.c b/net/core/dev.c
index 3fc27b52bf429..34f80946d2c72 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3523,6 +3523,11 @@ static netdev_features_t gso_features_check(const struct sk_buff *skb,
 	if (gso_segs > dev->gso_max_segs)
 		return features & ~NETIF_F_GSO_MASK;
 
+	if (!skb_shinfo(skb)->gso_type) {
+		skb_warn_bad_offload(skb);
+		return features & ~NETIF_F_GSO_MASK;
+	}
+
 	/* Support for GSO partial features requires software
 	 * intervention before we can actually process the packets
 	 * so we need to strip support for any partial features now




[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