]> git.ipfire.org Git - thirdparty/qemu.git/commit
scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 14 Aug 2019 12:05:21 +0000 (17:35 +0530)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 2 Oct 2019 00:12:53 +0000 (19:12 -0500)
commitb65e78320bba2655b60355739ed1a1da2ccc6c78
treeb3e7721001095efbb2ca5b447ed73afa8c5ac799
parent4f1c6cb2f9afafda05eab150fd2bd284edce6676
scsi: lsi: exit infinite loop while executing script (CVE-2019-12068)

When executing script in lsi_execute_script(), the LSI scsi adapter
emulator advances 's->dsp' index to read next opcode. This can lead
to an infinite loop if the next opcode is empty. Move the existing
loop exit after 10k iterations so that it covers no-op opcodes as
well.

Reported-by: Bugs SysSec <bugs-syssec@rub.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit de594e47659029316bbf9391efb79da0a1a08e08)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/lsi53c895a.c