Re: [PATCH] pci: check bus pointer before dereference

2020-10-30 Thread Fam Zheng
On Fri, 2020-10-30 at 05:01 -0400, Michael S. Tsirkin wrote: > On Wed, Sep 30, 2020 at 10:32:42AM +0530, P J P wrote: > > > > [+Paolo, +Fam Zheng - for scsi] > > > > +-- On Mon, 28 Sep 2020, P J P wrote --+ > > > +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ > > > > On Wed, 16 Sep 2020 at

Re: [PATCH] pci: check bus pointer before dereference

2020-10-30 Thread Michael S. Tsirkin
On Wed, Sep 30, 2020 at 10:32:42AM +0530, P J P wrote: > > [+Paolo, +Fam Zheng - for scsi] > > +-- On Mon, 28 Sep 2020, P J P wrote --+ > | +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ > | | On Wed, 16 Sep 2020 at 07:28, P J P wrote: > | | > -> >

Re: [PATCH] pci: check bus pointer before dereference

2020-09-30 Thread P J P
+-- On Wed, 30 Sep 2020, Igor Mammedov wrote --+ | 'dest' is offset into MemoryRegion, so far I don't see how it could break | into QEMU stack. Do you have a simple reproducer? Please see: -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Flsi_nullptr1 Thank you. -- Prasad J

Re: [PATCH] pci: check bus pointer before dereference

2020-09-30 Thread Igor Mammedov
On Wed, 30 Sep 2020 10:32:42 +0530 (IST) P J P wrote: > [+Paolo, +Fam Zheng - for scsi] > > +-- On Mon, 28 Sep 2020, P J P wrote --+ > | +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ > | | On Wed, 16 Sep 2020 at 07:28, P J P wrote: > | | > -> >

Re: [PATCH] pci: check bus pointer before dereference

2020-09-29 Thread P J P
[+Paolo, +Fam Zheng - for scsi] +-- On Mon, 28 Sep 2020, P J P wrote --+ | +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ | | On Wed, 16 Sep 2020 at 07:28, P J P wrote: | | > -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Flsi_nullptr1 | | > ==1183858==Hint: address points to

Re: [PATCH] pci: check bus pointer before dereference

2020-09-28 Thread P J P
Hello, +-- On Wed, 16 Sep 2020, Peter Maydell wrote --+ | On Wed, 16 Sep 2020 at 07:28, P J P wrote: | > -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Flsi_nullptr1 | > ==1183858==Hint: address points to the zero page. | > #0 pci_change_irq_level hw/pci/pci.c:259 | > #1

Re: [PATCH] pci: check bus pointer before dereference

2020-09-16 Thread Peter Maydell
On Wed, 16 Sep 2020 at 07:28, P J P wrote: > === > diff --git a/hw/pci/pci.c b/hw/pci/pci.c > index de0fae10ab..0ccb991410 100644 > --- a/hw/pci/pci.c > +++ b/hw/pci/pci.c > @@ -253,6 +253,7 @@ static void pci_change_irq_level(PCIDevice *pci_dev, int > irq_num, int change) > PCIBus *bus; >

Re: [PATCH] pci: check bus pointer before dereference

2020-09-16 Thread P J P
+-- On Tue, 15 Sep 2020, Philippe Mathieu-Daudé wrote --+ | > I think in normal this 'bus' will be not NULL. I have look at the link in | > the commit msg. I find it is another DMA to MMIO issue which we have | > discussed a lot but didn't come up with an satisfying solution. If 'bus' is

Re: [PATCH] pci: check bus pointer before dereference

2020-09-15 Thread Philippe Mathieu-Daudé
+Igor On 9/15/20 3:51 PM, Li Qiang wrote: > P J P 于2020年8月27日周四 下午7:52写道: >> >> From: Prasad J Pandit >> >> While mapping IRQ level in pci_change_irq_level() routine, >> it does not check if pci_get_bus() returned a valid pointer. >> It may lead to a NULL pointer dereference issue. Add check to

Re: [PATCH] pci: check bus pointer before dereference

2020-09-15 Thread Li Qiang
P J P 于2020年8月27日周四 下午7:52写道: > > From: Prasad J Pandit > > While mapping IRQ level in pci_change_irq_level() routine, > it does not check if pci_get_bus() returned a valid pointer. > It may lead to a NULL pointer dereference issue. Add check to > avoid it. > > ->

Re: [PATCH] pci: check bus pointer before dereference

2020-09-15 Thread P J P
+-- On Thu, 27 Aug 2020, P J P wrote --+ | While mapping IRQ level in pci_change_irq_level() routine, | it does not check if pci_get_bus() returned a valid pointer. | It may lead to a NULL pointer dereference issue. Add check to | avoid it. | | ->

[PATCH] pci: check bus pointer before dereference

2020-08-27 Thread P J P
From: Prasad J Pandit While mapping IRQ level in pci_change_irq_level() routine, it does not check if pci_get_bus() returned a valid pointer. It may lead to a NULL pointer dereference issue. Add check to avoid it. -> https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Flsi_nullptr1