acpi: validate hotplug selector on access
PATCH 1/1 acpi: validate hotplug selector on access
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.
--- hw/acpi/pcihp.c | 3 +++ 1 file changed, 3 insertions(+)
hw/acpi/pcihp.c +3 -0
@@ -491,6 +491,9 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data, } bus =acpi_pcihp_find_hotplug_bus (s, s->hotplug_select); +if (!bus) { +break ; + } QTAILQ_FOREACH_SAFE(kid, &bus->qbus.children, sibling, next) {Object *o =OBJECT (kid->child);PCIDevice *dev =PCI_DEVICE (o);
Signature · 1 line
MST
Quoted 5 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.
Quoted 7 lines
Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>--- hw/acpi/pcihp.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 4 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.
Good fix. Nice catch.
Quoted 5 lines
Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>
Quoted 22 lines
--- hw/acpi/pcihp.c | 3 +++ 1 file changed, 3 insertions(+)hw/acpi/pcihp.c +3
-1@@ -491,6 +491,9 @@ static void pci_write(void *opaque, hwaddr addr, uint64_t data, } bus =acpi_pcihp_find_hotplug_bus (s, s->hotplug_select); +if (!bus) { +break ; + } QTAILQ_FOREACH_SAFE(kid, &bus->qbus.children, sibling, next) {Object *o =OBJECT (kid->child);PCIDevice *dev =PCI_DEVICE (o); --MST
+Mauro & Alex
Quoted 9 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>
It seems this problem is important enough to get a CVE assigned.
Mauro, please update us when you get the CVE number. Michael, please amend the CVE number before committing the fix.
FWIW Paolo asked every fuzzed bug reproducer to be committed as qtest, see tests/qtest/fuzz*c. Alex has a way to generate reproducer in plain C.
Regards,
Phil.
Quoted 8 lines · Philippe Mathieu-Daudé
+Mauro & Alex
Quoted 5 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.
Quoted 6 lines
Quoted 4 lines
Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>It seems this problem is important enough to get a CVE assigned.
Guest root can crash guest.
I don't see why we would assign a CVE.
Quoted 10 lines
Mauro, please update us when you get the CVE number. Michael, please amend the CVE number before committing the fix.
FWIW Paolo asked every fuzzed bug reproducer to be committed as qtest, see tests/qtest/fuzz*c. Alex has a way to generate reproducer in plain C.
Regards,
Phil.
Quoted 14 lines · Michael S. Tsirkin
Quoted 13 lines · Philippe Mathieu-Daudé
+Mauro & Alex
Quoted 9 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>
Quoted 4 lines
Quoted 1 line
It seems this problem is important enough to get a CVE assigned.
Guest root can crash guest.
I don't see why we would assign a CVE.
Well thinking about downstream distributions, if there is a CVE assigned, it helps them to have it written in the commit. Maybe I am mistaken.
Unrelated but it seems there is a coordination problem with the qemu-security@ list,
if this isn't a security issue, why was a CVE requested?
Quoted 11 lines
Quoted 10 lines
Mauro, please update us when you get the CVE number. Michael, please amend the CVE number before committing the fix.
FWIW Paolo asked every fuzzed bug reproducer to be committed as qtest, see tests/qtest/fuzz*c. Alex has a way to generate reproducer in plain C.
Regards,
Phil.
Quoted 20 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Michael S. Tsirkin
Quoted 13 lines · Philippe Mathieu-Daudé
+Mauro & Alex
Quoted 9 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>Quoted 4 lines
Quoted 1 line
It seems this problem is important enough to get a CVE assigned.
Guest root can crash guest.
I don't see why we would assign a CVE.
Quoted 6 lines
Well thinking about downstream distributions, if there is a CVE assigned, it helps them to have it written in the commit. Maybe I am mistaken.
Unrelated but it seems there is a coordination problem with the qemu-security@ list,
if this isn't a security issue, why was a CVE requested?
Right. I don't think a priveleged user crashing VM warrants a CVE, it can just halt a CPU or whatever. Just cancel the CVE request pls.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Mauro, please update us when you get the CVE number. Michael, please amend the CVE number before committing the fix.
FWIW Paolo asked every fuzzed bug reproducer to be committed as qtest, see tests/qtest/fuzz*c. Alex has a way to generate reproducer in plain C.
Regards,
Phil.
Hi,
Quoted 25 lines · Michael S. Tsirkin
Quoted 23 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Michael S. Tsirkin
Quoted 13 lines · Philippe Mathieu-Daudé
+Mauro & Alex
Quoted 9 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>Quoted 4 lines
Quoted 1 line
It seems this problem is important enough to get a CVE assigned.
Guest root can crash guest.
I don't see why we would assign a CVE.Well thinking about downstream distributions, if there is a CVE assigned, it helps them to have it written in the commit. Maybe I am mistaken.
Quoted 6 lines
Quoted 3 lines
Unrelated but it seems there is a coordination problem with the qemu-security@ list,
if this isn't a security issue, why was a CVE requested?Right. I don't think a priveleged user crashing VM warrants a CVE, it can just halt a CPU or whatever. Just cancel the CVE request pls.
While I agree with you that this is kind of borderline and I expressed similar concerns in the past, I was told that:
1) root guest users are not necessarily trustworthy (from the host perspective).
2) NULL pointer deref and similar issues caused by an ill-handled/error condition are CVE worthy, even if triggered by root.
3) In other cases, DoS triggered by root is not a security issue because it's an expected behavior and not an ill-handled/error condition (think of assert failures, for example).
In other words, "ill-handled condition" is the crucial factor that makes a bug CVE worthy or not.
+Prasad, can you shed some light on this? Is my understanding correct?
Also, please note that we regularly get CVE requests for bugs like this and many CVEs have been assigned in the past. Of course that doesn't mean we can't change things going forward, but I think we should make it clear (probably here:
https://www.qemu.org/docs/master/system/security.html) that these kinds of bugs are not eligible for CVE assignment.
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Mauro, please update us when you get the CVE number. Michael, please amend the CVE number before committing the fix.
FWIW Paolo asked every fuzzed bug reproducer to be committed as qtest, see tests/qtest/fuzz*c. Alex has a way to generate reproducer in plain C.
Regards,
Phil.
Signature · 3 lines
Mauro Matteo Cascella Red Hat Product Security PGP-Key ID: BB3410B0
Quoted 45 lines · Mauro Matteo Cascella
Hi,
Quoted 25 lines · Michael S. Tsirkin
Quoted 23 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Michael S. Tsirkin
Quoted 13 lines · Philippe Mathieu-Daudé
+Mauro & Alex
Quoted 9 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>Quoted 4 lines
Quoted 1 line
It seems this problem is important enough to get a CVE assigned.
Guest root can crash guest.
I don't see why we would assign a CVE.Well thinking about downstream distributions, if there is a CVE assigned, it helps them to have it written in the commit. Maybe I am mistaken.
Quoted 6 lines
Quoted 3 lines
Unrelated but it seems there is a coordination problem with the qemu-security@ list,
if this isn't a security issue, why was a CVE requested?Right. I don't think a priveleged user crashing VM warrants a CVE, it can just halt a CPU or whatever. Just cancel the CVE request pls.
While I agree with you that this is kind of borderline and I expressed similar concerns in the past, I was told that:
1) root guest users are not necessarily trustworthy (from the host perspective).
2) NULL pointer deref and similar issues caused by an ill-handled/error condition are CVE worthy, even if triggered by root.
3) In other cases, DoS triggered by root is not a security issue because it's an expected behavior and not an ill-handled/error condition (think of assert failures, for example).
Quoted 2 lines
In other words, "ill-handled condition" is the crucial factor that makes a bug CVE worthy or not.
I guess the point is that a downstream might have a slightly different code path where it would be more serious ...
OK then, not a big deal for me. So what's the CVE # then?
Quoted 8 lines
+Prasad, can you shed some light on this? Is my understanding correct?
Also, please note that we regularly get CVE requests for bugs like this and many CVEs have been assigned in the past. Of course that doesn't mean we can't change things going forward, but I think we should make it clear (probably here:
https://www.qemu.org/docs/master/system/security.html) that these kinds of bugs are not eligible for CVE assignment.
That would be good, yes.
Quoted 17 lines
Quoted 12 lines
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Mauro, please update us when you get the CVE number. Michael, please amend the CVE number before committing the fix.
FWIW Paolo asked every fuzzed bug reproducer to be committed as qtest, see tests/qtest/fuzz*c. Alex has a way to generate reproducer in plain C.
Regards,
Phil.
Signature · 3 lines
Mauro Matteo Cascella Red Hat Product Security PGP-Key ID: BB3410B0
Quoted 47 lines · Michael S. Tsirkin
Quoted 45 lines · Mauro Matteo Cascella
Hi,
Quoted 25 lines · Michael S. Tsirkin
Quoted 23 lines · Philippe Mathieu-Daudé
Quoted 14 lines · Michael S. Tsirkin
Quoted 13 lines · Philippe Mathieu-Daudé
+Mauro & Alex
Quoted 9 lines · Michael S. Tsirkin
When bus is looked up on a pci write, we didn't validate that the lookup succeeded.
Fuzzers thus can trigger QEMU crash by dereferencing the NULL bus pointer.Fixes b32bd763a1 ("pci: introduce acpi-index property for PCI device")Cc "Igor Mammedov" <[email protected]>Signed-off-by Michael S. Tsirkin <[email protected]>Quoted 4 lines
Quoted 1 line
It seems this problem is important enough to get a CVE assigned.
Guest root can crash guest.
I don't see why we would assign a CVE.Well thinking about downstream distributions, if there is a CVE assigned, it helps them to have it written in the commit. Maybe I am mistaken.
Quoted 6 lines
Quoted 3 lines
Unrelated but it seems there is a coordination problem with the qemu-security@ list,
if this isn't a security issue, why was a CVE requested?Right. I don't think a priveleged user crashing VM warrants a CVE, it can just halt a CPU or whatever. Just cancel the CVE request pls.
While I agree with you that this is kind of borderline and I expressed similar concerns in the past, I was told that:
1) root guest users are not necessarily trustworthy (from the host perspective).
2) NULL pointer deref and similar issues caused by an ill-handled/error condition are CVE worthy, even if triggered by root.
3) In other cases, DoS triggered by root is not a security issue because it's an expected behavior and not an ill-handled/error condition (think of assert failures, for example).
Quoted 6 lines
Quoted 2 lines
In other words, "ill-handled condition" is the crucial factor that makes a bug CVE worthy or not.
I guess the point is that a downstream might have a slightly different code path where it would be more serious ...
OK then, not a big deal for me. So what's the CVE # then?
CVE-2021-4158 has been assigned for this issue.
Quoted 8 lines
Quoted 8 lines
+Prasad, can you shed some light on this? Is my understanding correct?
Also, please note that we regularly get CVE requests for bugs like this and many CVEs have been assigned in the past. Of course that doesn't mean we can't change things going forward, but I think we should make it clear (probably here:
https://www.qemu.org/docs/master/system/security.html) that these kinds of bugs are not eligible for CVE assignment.
Thanks.
Signature · 3 lines
Mauro Matteo Cascella Red Hat Product Security PGP-Key ID: BB3410B0