]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
authorMauro Matteo Cascella <mcascell@redhat.com>
Thu, 4 Nov 2021 16:31:38 +0000 (17:31 +0100)
committerMichael Roth <michael.roth@amd.com>
Tue, 14 Dec 2021 20:22:44 +0000 (14:22 -0600)
commitc2c7f108b8228091d7ad4bd488c3abb9adc632e7
treef44b18d245b3f28ce7f00641157f3d828b6be6d1
parent3488bb205de0537ba5364ee1ee09cb07a26a4bb0
hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands

This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().

Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pages in a table")
Fixes: #546
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Signed-off-by: Mauro Matteo Cascella <mcascell@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8)
Signed-off-by: Michael Roth <michael.roth@amd.com>
hw/scsi/scsi-disk.c