qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] smbios: sanitize type from external type before checking


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2] smbios: sanitize type from external type before checking have_fields_bitmap
Date: Mon, 5 Sep 2022 23:31:14 +0200

On Mon, Sep 5, 2022 at 10:44 PM Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> test_bit uses header->type as an offset; if the file incorrectly specifies a
> type greater than 127, smbios_entry_add will read and write garbage.
>
> To fix this, just pass the smbios data through, assuming the user knows what
> to do.  Reported by Coverity as CID 1487255.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/smbios/smbios.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]