]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
libbpf: Ensure umem pointer is non-NULL before dereferencing
authorCiara Loftus <ciara.loftus@intel.com>
Wed, 31 Mar 2021 06:12:16 +0000 (06:12 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 7 May 2021 07:53:24 +0000 (09:53 +0200)
commitd5da239365135766043b05960aaba26241ca3c66
tree2a38656665c00cf43933510b5698220746b14011
parent2ff94405ba2ae987040088c78f14b48c4e260d94
libbpf: Ensure umem pointer is non-NULL before dereferencing

BugLink: https://bugs.launchpad.net/bugs/1926368
commit df662016310aa4475d7986fd726af45c8fe4f362 upstream.

Calls to xsk_socket__create dereference the umem to access the
fill_save and comp_save pointers. Make sure the umem is non-NULL
before doing this.

Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Magnus Karlsson <magnus.karlsson@intel.com>
Link: https://lore.kernel.org/bpf/20210331061218.1647-2-ciara.loftus@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
tools/lib/bpf/xsk.c