]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
libbpf: Fix potential NULL pointer dereference
authorCiara Loftus <ciara.loftus@intel.com>
Thu, 8 Apr 2021 05:20:09 +0000 (05:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Apr 2021 11:13:24 +0000 (13:13 +0200)
commitb33f7e0d5e86e1c758d76838ef7e831d99b176bf
tree4a4169703df6a50b109b2cd8f0ac9e350ad17612
parentf40de00794a4cb3dc4b1a6e03f4b918ac5f44b99
libbpf: Fix potential NULL pointer dereference

commit afd0be7299533bb2e2b09104399d8a467ecbd2c5 upstream.

Wait until after the UMEM is checked for null to dereference it.

Fixes: 43f1bc1efff1 ("libbpf: Restore umem state after socket create failure")
Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20210408052009.7844-1-ciara.loftus@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/lib/bpf/xsk.c