This is a note to let you know that I've just added the patch titled gro: take care of DODGY packets to the 6.1-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: gro-take-care-of-dodgy-packets.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 90252422f92611d0d16b429c93ce953d16eb1a14 Author: Eric Dumazet <edumazet@xxxxxxxxxx> Date: Fri Jan 6 14:25:23 2023 +0000 gro: take care of DODGY packets [ Upstream commit 7871f54e3deed68a27111dda162c4fe9b9c65f8f ] Jaroslav reported a recent throughput regression with virtio_net caused by blamed commit. It is unclear if DODGY GSO packets coming from user space can be accepted by GRO engine in the future with minimal changes, and if there is any expected gain from it. In the meantime, make sure to detect and flush DODGY packets. Fixes: 5eddb24901ee ("gro: add support of (hw)gro packets to gro stack") Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx> Reported-and-bisected-by: Jaroslav Pulchart <jaroslav.pulchart@xxxxxxxxxxxx> Cc: Coco Li <lixiaoyan@xxxxxxxxxx> Cc: Paolo Abeni <pabeni@xxxxxxxxxx> Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/core/gro.c b/net/core/gro.c index 8e0fe85a647d..1b4abfb9a7a1 100644 --- a/net/core/gro.c +++ b/net/core/gro.c @@ -507,8 +507,9 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff NAPI_GRO_CB(skb)->count = 1; if (unlikely(skb_is_gso(skb))) { NAPI_GRO_CB(skb)->count = skb_shinfo(skb)->gso_segs; - /* Only support TCP at the moment. */ - if (!skb_is_gso_tcp(skb)) + /* Only support TCP and non DODGY users. */ + if (!skb_is_gso_tcp(skb) || + (skb_shinfo(skb)->gso_type & SKB_GSO_DODGY)) NAPI_GRO_CB(skb)->flush = 1; }