mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net-gro: Fix GRO flush when receiving a GSO packet.
[ Upstream commit0ab03f353d] Currently we may merge incorrectly a received GSO packet or a packet with frag_list into a packet sitting in the gro_hash list. skb_segment() may crash case because the assumptions on the skb layout are not met. The correct behaviour would be to flush the packet in the gro_hash list and send the received GSO packet directly afterwards. Commitd61d072e87("net-gro: avoid reorders") sets NAPI_GRO_CB(skb)->flush in this case, but this is not checked before merging. This patch makes sure to check this flag and to not merge in that case. Fixes:d61d072e87("net-gro: avoid reorders") Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
393c8b4c67
commit
23bfd22981
@@ -3808,7 +3808,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)
|
||||
struct sk_buff *lp, *p = *head;
|
||||
unsigned int delta_truesize;
|
||||
|
||||
if (unlikely(p->len + len >= 65536))
|
||||
if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush))
|
||||
return -E2BIG;
|
||||
|
||||
lp = NAPI_GRO_CB(p)->last;
|
||||
|
||||
Reference in New Issue
Block a user