Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
qemu.20749
0261-esp-always-check-current_req-is-not.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0261-esp-always-check-current_req-is-not.patch of Package qemu.20749
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Date: Wed, 7 Apr 2021 20:57:50 +0100 Subject: esp: always check current_req is not NULL before use in DMA callbacks Git-commit: 0db895361b8a82e1114372ff9f4857abea605701 References: bsc#1180433, CVE-2020-35504 bsc#1180434, CVE-2020-35505 bsc#1180435, CVE-2020-35506 After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel callback which resets both current_req and current_dev to NULL. If any data is left in the transfer buffer (async_len != 0) then the next TI (Transfer Information) command will attempt to reference the NULL pointer causing a segfault. Buglink: https://bugs.launchpad.net/qemu/+bug/1910723 Buglink: https://bugs.launchpad.net/qemu/+bug/1909247 Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Tested-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20210407195801.685-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Jose R Ziviani <jose.ziviani@suse.com> --- hw/scsi/esp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c index ee586e7d6c9b88a3d6abc73a8652..f50c3f6e0a5692a534a391bbde41 100644 --- a/hw/scsi/esp.c +++ b/hw/scsi/esp.c @@ -253,6 +253,9 @@ static void esp_do_dma(ESPState *s) s->dma_memory_read(s->dma_opaque, &s->cmdbuf[s->cmdlen], len); return; } + if (!s->current_req) { + return; + } if (s->async_len == 0) { /* Defer until data is available. */ return;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor