Re: [PATCH 04/11] virtio: pci: Check virtio common config size

Bin Meng
2022-03-24T14:22:44Z

On Sun, Mar 20, 2022 at 7:41 PM Andrew Scull <ascull@google.com> wrote:
>
> Check that the common config is at least as large as the struct it is
> expected to contain. Only then is it safe to cast the pointer and be
> safe from out-of-bounds accesses.
>
> Signed-off-by: Andrew Scull <ascull@google.com>
> ---
> drivers/virtio/virtio_pci_modern.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>