From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] smbios: sanitize type from external type before checking have_fields_bitmap
Date: Mon, 5 Sep 2022 23:31:14 +0200 [thread overview]
Message-ID: <CAAdtpL4rM8Z-USyPf=oQaVko5wcOjQtASOihWO5QoCtdpL75Qw@mail.gmail.com> (raw)
In-Reply-To: <20220905204349.102405-1-pbonzini@redhat.com>
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>
prev parent reply other threads:[~2022-09-05 21:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-05 20:43 [PATCH v2] smbios: sanitize type from external type before checking have_fields_bitmap Paolo Bonzini
2022-09-05 21:31 ` Philippe Mathieu-Daudé via [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAdtpL4rM8Z-USyPf=oQaVko5wcOjQtASOihWO5QoCtdpL75Qw@mail.gmail.com' \
--to=qemu-devel@nongnu.org \
--cc=f4bug@amsat.org \
--cc=pbonzini@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).