aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJonathan Lemon <jonathan.lemon@gmail.com>2019-09-24 09:25:21 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2019-09-25 22:14:16 +0200
commitfcd30ae0665c778e283f73c1c885c7fd26d12ef2 (patch)
tree2adc59ffd81cc960357f76910e7df660c9bb30f2 /tools
parentselftests/bpf: test_progs: fix client/server race in tcp_rtt (diff)
downloadlinux-dev-fcd30ae0665c778e283f73c1c885c7fd26d12ef2.tar.xz
linux-dev-fcd30ae0665c778e283f73c1c885c7fd26d12ef2.zip
bpf/xskmap: Return ERR_PTR for failure case instead of NULL.
When kzalloc() failed, NULL was returned to the caller, which tested the pointer with IS_ERR(), which didn't match, so the pointer was used later, resulting in a NULL dereference. Return ERR_PTR(-ENOMEM) instead of NULL. Reported-by: syzbot+491c1b7565ba9069ecae@syzkaller.appspotmail.com Fixes: 0402acd683c6 ("xsk: remove AF_XDP socket from map when the socket is released") Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com> Acked-by: Björn Töpel <bjorn.topel@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions