summaryrefslogtreecommitdiff
path: root/kernel/bpf/syscall.c
diff options
context:
space:
mode:
authorBjörn Töpel <bjorn.topel@intel.com>2020-12-07 11:20:08 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2020-12-08 19:11:58 +0300
commit3546b9b8eced9799b35ef953f766a0973b17fda2 (patch)
tree7e54c3cfa6e6645d09938f6b368cc391597f2710 /kernel/bpf/syscall.c
parent2f4b03195fe8ed3b1e213f4a6cfe14cfc109d829 (diff)
downloadlinux-3546b9b8eced9799b35ef953f766a0973b17fda2.tar.xz
xsk: Validate socket state in xsk_recvmsg, prior touching socket members
In AF_XDP the socket state needs to be checked, prior touching the members of the socket. This was not the case for the recvmsg implementation. Fix that by moving the xsk_is_bound() call. Fixes: 45a86681844e ("xsk: Add support for recvmsg()") Reported-by: kernel test robot <oliver.sang@intel.com> Signed-off-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Magnus Karlsson <magnus.karlsson@intel.com> Link: https://lore.kernel.org/bpf/20201207082008.132263-1-bjorn.topel@gmail.com
Diffstat (limited to 'kernel/bpf/syscall.c')
0 files changed, 0 insertions, 0 deletions