]> git.ipfire.org Git - thirdparty/qemu.git/commit
virtio-net: Avoid indirection_table_mask overflow
authorAkihiko Odaki <akihiko.odaki@daynix.com>
Tue, 8 Oct 2024 06:51:03 +0000 (15:51 +0900)
committerJason Wang <jasowang@redhat.com>
Tue, 29 Oct 2024 07:53:29 +0000 (15:53 +0800)
commitcd76e8fcbe1a340776ae61b4e182be3a45b26219
tree842e1b7df3a321c5b528a562f30b943af9a579f8
parente29bc931e1699a98959680f6776b48673825762b
virtio-net: Avoid indirection_table_mask overflow

We computes indirections_len by adding 1 to indirection_table_mask, but
it may overflow indirection_table_mask is UINT16_MAX. Check if
indirection_table_mask is small enough before adding 1.

Fixes: 590790297c0d ("virtio-net: implement RSS configuration command")
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/virtio-net.c