Home
last modified time | relevance | path

Searched hist:"981 f14d42a7f1610292a1ef0f7cd00138fff361d" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/
H A Dvirtio_net.cdiff 981f14d42a7f1610292a1ef0f7cd00138fff361d Tue Jan 31 02:50:04 CST 2023 Heng Qi <hengqi@linux.alibaba.com> virtio-net: fix possible unsigned integer overflow

When the single-buffer xdp is loaded and after xdp_linearize_page()
is called, *num_buf becomes 0 and (*num_buf - 1) may overflow into
a large integer in virtnet_build_xdp_buff_mrg(), resulting in
unexpected packet dropping.

Fixes: ef75cb51f139 ("virtio-net: build xdp_buff with multi buffers")
Signed-off-by: Heng Qi <hengqi@linux.alibaba.com>
Reviewed-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20230131085004.98687-1-hengqi@linux.alibaba.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>