]> git.baikalelectronics.ru Git - kernel.git/commit
xsk: Fix out of boundary write in __xsk_rcv_memcpy
authorLi RongQing <lirongqing@baidu.com>
Thu, 2 Apr 2020 07:52:10 +0000 (15:52 +0800)
committerDaniel Borkmann <daniel@iogearbox.net>
Mon, 6 Apr 2020 19:48:05 +0000 (21:48 +0200)
commit42bc2e9c5d6612c6086fcba528dd121d24aeb32c
tree20fda0873765ba42e4ab7b59f6ee1de2e933fde1
parentf19b9ec4c3ab4480fde0761fb8dad8a7e42b7259
xsk: Fix out of boundary write in __xsk_rcv_memcpy

first_len is the remainder of the first page we're copying.
If this size is larger, then out of page boundary write will
otherwise happen.

Fixes: 33b04ef35b44 ("xsk: add support to allow unaligned chunk placement")
Signed-off-by: Li RongQing <lirongqing@baidu.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/1585813930-19712-1-git-send-email-lirongqing@baidu.com
net/xdp/xsk.c