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

Bin Meng bmeng.cn at gmail.com
Thu Mar 24 15:22:25 CET 2022


On Sun, Mar 20, 2022 at 7:41 PM Andrew Scull <ascull at 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 at google.com>
> ---
>  drivers/virtio/virtio_pci_modern.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>

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


More information about the U-Boot mailing list