diff options
| author | Paolo Bonzini | 2021-02-03 14:18:27 +0100 |
|---|---|---|
| committer | Michael S. Tsirkin | 2021-02-05 14:52:58 +0100 |
| commit | 7c16b5bbb6c0f797945327d17e4be60f25a4427d (patch) | |
| tree | 0e6282cdb510ac438890d0224a814c9f9ec72979 /include | |
| parent | Merge remote-tracking branch 'remotes/kraxel/tags/vga-ui-20210205-pull-reques... (diff) | |
| download | qemu-7c16b5bbb6c0f797945327d17e4be60f25a4427d.tar.gz qemu-7c16b5bbb6c0f797945327d17e4be60f25a4427d.tar.xz qemu-7c16b5bbb6c0f797945327d17e4be60f25a4427d.zip | |
pci: reject too large ROMs
get_image_size() returns an int64_t, which pci_add_option_rom() assigns
to an "int" without any range checking. A 32-bit BAR could be up to
2 GiB in size, so reject anything above it. In order to accomodate
a rounded-up size of 2 GiB, change pci_patch_ids's size argument
to unsigned.
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210203131828.156467-2-pbonzini@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: David Edmondson <david.edmondson@oracle.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
