diff options
author | Stanislav Fomichev <[email protected]> | 2022-02-28 15:23:32 -0800 |
---|---|---|
committer | Daniel Borkmann <[email protected]> | 2022-03-02 01:09:15 +0100 |
commit | 530e214c5b5acbfaf819d884b196f3c61f5eca3d (patch) | |
tree | b74928a2048b7d594ff7978cb88aaa1a38d7bba6 /drivers/fpga/fpga-bridge.c | |
parent | bd004cad78c04d762a99127af2f8208b9579af21 (diff) |
bpf, test_run: Fix overflow in XDP frags bpf_test_finish
Syzkaller reports another issue:
WARNING: CPU: 0 PID: 10775 at include/linux/thread_info.h:230
check_copy_size include/linux/thread_info.h:230 [inline]
WARNING: CPU: 0 PID: 10775 at include/linux/thread_info.h:230
copy_to_user include/linux/uaccess.h:199 [inline]
WARNING: CPU: 0 PID: 10775 at include/linux/thread_info.h:230
bpf_test_finish.isra.0+0x4b2/0x680 net/bpf/test_run.c:171
This can happen when the userspace buffer is smaller than head + frags.
Return ENOSPC in this case.
Fixes: 7855e0db150a ("bpf: test_run: add xdp_shared_info pointer in bpf_test_finish signature")
Reported-by: [email protected]
Signed-off-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Cc: Lorenzo Bianconi <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'drivers/fpga/fpga-bridge.c')
0 files changed, 0 insertions, 0 deletions