Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:Update
qemu
0423-scsi-lsi53c895a-really-fix-use-afte.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0423-scsi-lsi53c895a-really-fix-use-afte.patch of Package qemu
From: Mauro Matteo Cascella <mcascell@redhat.com> Date: Mon, 11 Jul 2022 14:33:16 +0200 Subject: scsi/lsi53c895a: really fix use-after-free in lsi_do_msgout (CVE-2022-0216) Git-commit: 4367a20cc442c56b05611b4224de9a61908f9eac References: bsc#1198038, CVE-2022-0216 Set current_req to NULL, not current_req->req, to prevent reusing a free'd buffer in case of repeated SCSI cancel requests. Also apply the fix to CLEAR QUEUE and BUS DEVICE RESET messages as well, since they also cancel the request. Thanks to Alexander Bulekov for providing a reproducer. Fixes: CVE-2022-0216 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/972 Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com> Tested-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20220711123316.421279-1-mcascell@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Dario Faggioli <dfaggioli@suse.com> --- hw/scsi/lsi53c895a.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/scsi/lsi53c895a.c b/hw/scsi/lsi53c895a.c index a0b9a617ebfbf19d53abce9afc5e..b8a7e07f36f95a907732f182e2cc 100644 --- a/hw/scsi/lsi53c895a.c +++ b/hw/scsi/lsi53c895a.c @@ -950,6 +950,7 @@ static void lsi_do_msgout(LSIState *s) DPRINTF("MSG: ABORT TAG tag=0x%x\n", current_tag); if (current_req) { scsi_req_cancel(current_req->req); + current_req = NULL; } lsi_disconnect(s); break; @@ -975,6 +976,7 @@ static void lsi_do_msgout(LSIState *s) /* clear the current I/O process */ if (s->current) { scsi_req_cancel(s->current->req); + current_req = NULL; } /* As the current implemented devices scsi_disk and scsi_generic
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