summaryrefslogtreecommitdiff
path: root/drivers/net/ieee802154/adf7242.c
diff options
context:
space:
mode:
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>2023-04-14 09:08:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-26 12:27:35 +0300
commitb6dd232f6350778a6ba440ea52bdfc4571b62a06 (patch)
treea6e59e1f1f9b46ba81298739cfd49c0a246ddca8 /drivers/net/ieee802154/adf7242.c
parentddcf35deb8f2a1d9addc74b586cf4c5a1f5d6020 (diff)
downloadlinux-b6dd232f6350778a6ba440ea52bdfc4571b62a06.tar.xz
virtio_net: bugfix overflow inside xdp_linearize_page()
[ Upstream commit 853618d5886bf94812f31228091cd37d308230f7 ] Here we copy the data from the original buf to the new page. But we not check that it may be overflow. As long as the size received(including vnethdr) is greater than 3840 (PAGE_SIZE -VIRTIO_XDP_HEADROOM). Then the memcpy will overflow. And this is completely possible, as long as the MTU is large, such as 4096. In our test environment, this will cause crash. Since crash is caused by the written memory, it is meaningless, so I do not include it. Fixes: 72979a6c3590 ("virtio_net: xdp, add slowpath case for non contiguous buffers") Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> Acked-by: Jason Wang <jasowang@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/ieee802154/adf7242.c')
0 files changed, 0 insertions, 0 deletions