]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
net-gro: Fix GRO flush when receiving a GSO packet.
authorSteffen Klassert <steffen.klassert@secunet.com>
Tue, 2 Apr 2019 06:16:03 +0000 (08:16 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit8629e4001fd12769821066adde91315f44bb9e7a
treeba2bd4cea92b53db80a0ef81bf927b3a49eb8093
parenta44febd21ef4e1d717d18358015f2103865eab9a
net-gro: Fix GRO flush when receiving a GSO packet.

BugLink: https://bugs.launchpad.net/bugs/1838116
[ Upstream commit 0ab03f353d3613ea49d1f924faf98559003670a8 ]

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. Commit d61d072e87c8e ("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: d61d072e87c8e ("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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/core/skbuff.c