]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
udp6: add missing checks on edumux packet processing
authorPaolo Abeni <pabeni@redhat.com>
Thu, 13 Sep 2018 14:27:21 +0000 (16:27 +0200)
committerJuerg Haefliger <juergh@canonical.com>
Wed, 24 Jul 2019 01:49:59 +0000 (19:49 -0600)
commit0d4f86f232679e42e2f5b7550cad298286ba1760
tree2e5106a850630564f40b948c241eed8a6c097baa
parentb972f215a4eaee36181406303edee41a744064c2
udp6: add missing checks on edumux packet processing

BugLink: https://bugs.launchpad.net/bugs/1836287
[ Upstream commit eb63f2964dbe36f26deac77d3016791675821ded ]

Currently the UDPv6 early demux rx code path lacks some mandatory
checks, already implemented into the normal RX code path - namely
the checksum conversion and no_check6_rx check.

Similar to the previous commit, we move the common processing to
an UDPv6 specific helper and call it from both edemux code path
and normal code path. In respect to the UDPv4, we need to add an
explicit check for non zero csum according to no_check6_rx value.

Reported-by: Jianlin Shi <jishi@redhat.com>
Suggested-by: Xin Long <lucien.xin@gmail.com>
Fixes: c9f2c1ae123a ("udp6: fix socket leak on early demux")
Fixes: 2abb7cdc0dc8 ("udp: Add support for doing checksum unnecessary conversion")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/ipv6/udp.c