Files
kernel_oneplus_sm8250/kernel
Jonathan Lemon f6b7363dd6 UPSTREAM: 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")
Change-Id: I84cde3fa3a4af63f86866eb15824c48a0ed2732c
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>
2025-08-28 03:24:45 +03:00
..
2019-12-13 08:51:11 +01:00
2020-01-15 14:51:23 +00:00
2019-08-12 13:36:37 -04:00
2021-02-07 14:48:38 +01:00
2024-05-03 06:16:46 +00:00