[0/7] vhost: ensure vitqueue access status is checked

Message ID 20230925163610.3307750-1-maxime.coquelin@redhat.com (mailing list archive)
Headers
Series vhost: ensure vitqueue access status is checked |

Message

Maxime Coquelin Sept. 25, 2023, 4:36 p.m. UTC
  Li Feng initially reported segmentation fault in rte_vhost_vring_call()
because of not checking the virtqueue metadata can be accessed.

This should be achieved by checking the access_ok status field of
the virtqueue.

This series also takes the opportunity to fix the other APIs.
This is split in multiple patches to ease LTS maintainers backports,
but could be squashed if preferred.

Maxime Coquelin (7):
  vhost: fix missing vring call check on virtqueue access
  vhost: fix missing check on virtqueue access
  vhost: fix checking virtqueue access when notifying guest
  vhost: fix check on virtqueue access in async registration
  vhost: Fix check on virtqueue access in in-flight getter
  vhost: fix missing lock protection in power monitor API
  vhost: fix checking virtqueue access ins stats API

 lib/vhost/vhost.c | 92 +++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 85 insertions(+), 7 deletions(-)
  

Comments

David Marchand Oct. 19, 2023, 9:49 a.m. UTC | #1
Hello Maxime,

On Mon, Sep 25, 2023 at 6:36 PM Maxime Coquelin
<maxime.coquelin@redhat.com> wrote:
>
> Li Feng initially reported segmentation fault in rte_vhost_vring_call()
> because of not checking the virtqueue metadata can be accessed.
>
> This should be achieved by checking the access_ok status field of
> the virtqueue.
>
> This series also takes the opportunity to fix the other APIs.
> This is split in multiple patches to ease LTS maintainers backports,
> but could be squashed if preferred.
>
> Maxime Coquelin (7):
>   vhost: fix missing vring call check on virtqueue access
>   vhost: fix missing check on virtqueue access
>   vhost: fix checking virtqueue access when notifying guest
>   vhost: fix check on virtqueue access in async registration
>   vhost: Fix check on virtqueue access in in-flight getter

Nit: fix*

>   vhost: fix missing lock protection in power monitor API
>   vhost: fix checking virtqueue access ins stats API

This series needs some rebasing, and I had a small comment on a first
patch Fixes: tag, but otherwise it lgtm.