vdpa: Read device configuration only if FEATURES_OK
mainline inclusion from mainline-v5.17-rc1 commit 30ef7a8a category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I5WXCZ CVE: NA Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30ef7a8ac8a07046b9ac9206d3a732a9f76b2e60 ---------------------------------------------------------------------- Avoid reading device configuration during feature negotiation. Read device status and verify that VIRTIO_CONFIG_S_FEATURES_OK is set. Protect the entire operation, including configuration read with cf_mutex to ensure integrity of the results. Signed-off-by: NEli Cohen <elic@nvidia.com> Link: https://lore.kernel.org/r/20220105114646.577224-5-elic@nvidia.comSigned-off-by: NMichael S. Tsirkin <mst@redhat.com> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NPengyuan Zhao <zhaopengyuan@hisilicon.com>
Showing
想要评论请 注册 或 登录