Re: [Xen-devel] [PATCH for-3.1] hw/xen/xen_pt_graphics: Don't trust the BIOS ROM contents so much

2018-12-14 Thread Stefano Stabellini
On Fri, 14 Dec 2018, Peter Maydell wrote: > On Mon, 26 Nov 2018 at 15:03, Anthony PERARD > wrote: > > > > On Mon, Nov 19, 2018 at 04:26:58PM +, Peter Maydell wrote: > > > Coverity (CID 796599) points out that xen_pt_setup_vga() trusts > > > the rom->size field in the BIOS ROM from a PCI

Re: [Xen-devel] [PATCH for-3.1] hw/xen/xen_pt_graphics: Don't trust the BIOS ROM contents so much

2018-12-14 Thread Peter Maydell
On Mon, 26 Nov 2018 at 15:03, Anthony PERARD wrote: > > On Mon, Nov 19, 2018 at 04:26:58PM +, Peter Maydell wrote: > > Coverity (CID 796599) points out that xen_pt_setup_vga() trusts > > the rom->size field in the BIOS ROM from a PCI passthrough VGA > > device, and uses it as an index into

[Xen-devel] [PATCH for-3.1] hw/xen/xen_pt_graphics: Don't trust the BIOS ROM contents so much

2018-11-19 Thread Peter Maydell
Coverity (CID 796599) points out that xen_pt_setup_vga() trusts the rom->size field in the BIOS ROM from a PCI passthrough VGA device, and uses it as an index into the memory which contains the BIOS image. A corrupt BIOS ROM could therefore cause us to index off the end of the buffer. Check that