virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh
commit725fe5d10dbd4259b1853b7d253cef83a3c0d22a
authorLi Hangjing <lihangjing@baidu.com>
Mon, 16 Dec 2019 02:30:50 +0000 (16 10:30 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Thu, 19 Dec 2019 16:20:25 +0000 (19 16:20 +0000)
tree56ed8920d017771de4acea80e07f186c546ffe5e
parentf21673c35e0a49e66e228825a9ea3e81a9947eed
virtio-blk: fix out-of-bounds access to bitmap in notify_guest_bh

When the number of a virtio-blk device's virtqueues is larger than
BITS_PER_LONG, the out-of-bounds access to bitmap[ ] will occur.

Fixes: e21737ab15 ("virtio-blk: multiqueue batch notify")
Cc: qemu-stable@nongnu.org
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Li Hangjing <lihangjing@baidu.com>
Reviewed-by: Xie Yongji <xieyongji@baidu.com>
Reviewed-by: Chai Wen <chaiwen@baidu.com>
Message-id: 20191216023050.48620-1-lihangjing@baidu.com
Message-Id: <20191216023050.48620-1-lihangjing@baidu.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
hw/block/dataplane/virtio-blk.c