summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorXie Yongji <xieyongji@bytedance.com>2021-08-09 13:16:09 +0300
committerMichael S. Tsirkin <mst@redhat.com>2021-08-11 13:44:24 +0300
commit82e89ea077b93b3c131fa175b0df3acb5b1d5cdf (patch)
tree42f68656fd5af5f72814197e1885885a4a1e5583 /include/linux
parente74cfa91f42c50f7f649b0eca46aa049754ccdbd (diff)
downloadlinux-82e89ea077b93b3c131fa175b0df3acb5b1d5cdf.tar.xz
virtio-blk: Add validation for block size in config space
An untrusted device might presents an invalid block size in configuration space. This tries to add validation for it in the validate callback and clear the VIRTIO_BLK_F_BLK_SIZE feature bit if the value is out of the supported range. And we also double check the value in virtblk_probe() in case that it's changed after the validation. Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Link: https://lore.kernel.org/r/20210809101609.148-1-xieyongji@bytedance.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions