]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - net/ipv4/udp.c
bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro
authorMartin KaFai Lau <kafai@fb.com>
Fri, 31 May 2019 22:29:13 +0000 (15:29 -0700)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitb06ba4f11aedc9d71059dee588e9e7f5400d6ee8
treed2e9a780c54405bfb45f164a3fff837cbbb1a565
parent8b4f78461a133c1e7abd46c6e7cd968620f5bfea
bpf: udp: Avoid calling reuseport's bpf_prog from udp_gro

BugLink: https://bugs.launchpad.net/bugs/1838824
commit 257a525fe2e49584842c504a92c27097407f778f upstream.

When the commit a6024562ffd7 ("udp: Add GRO functions to UDP socket")
added udp[46]_lib_lookup_skb to the udp_gro code path, it broke
the reuseport_select_sock() assumption that skb->data is pointing
to the transport header.

This patch follows an earlier __udp6_lib_err() fix by
passing a NULL skb to avoid calling the reuseport's bpf_prog.

Fixes: a6024562ffd7 ("udp: Add GRO functions to UDP socket")
Cc: Tom Herbert <tom@herbertland.com>
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
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/ipv4/udp.c
net/ipv6/udp.c