diff options
author | Heng Qi <hengqi@linux.alibaba.com> | 2023-01-31 09:50:04 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-02-02 06:31:56 +0100 |
commit | 981f14d42a7f1610292a1ef0f7cd00138fff361d (patch) | |
tree | 43f4d15d7a4353b1ac99de3a16baaaf985dcc1eb /io_uring/sync.h | |
parent | netlink: provide an ability to set default extack message (diff) | |
download | linux-981f14d42a7f1610292a1ef0f7cd00138fff361d.tar.xz linux-981f14d42a7f1610292a1ef0f7cd00138fff361d.zip |
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>
Diffstat (limited to 'io_uring/sync.h')
0 files changed, 0 insertions, 0 deletions