OSDN Git Service

hw/scsi/megasas: Fix possible out-of-bounds array access in tracepoints
authorThomas Huth <thuth@redhat.com>
Mon, 15 Jun 2020 07:26:29 +0000 (09:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 26 Jun 2020 13:39:37 +0000 (09:39 -0400)
commitee760ac80ac1f130138e8eb4eba263a4d48ace51
treebf55873da6be7148d07ada7e2c28a2271e44eb5b
parent5f509751f711b54717c1be03d55d096015b1712b
hw/scsi/megasas: Fix possible out-of-bounds array access in tracepoints

Some tracepoints in megasas.c use a guest-controlled value as an index
into the mfi_frame_desc[] array. Thus a malicious guest could cause an
out-of-bounds error here. Fortunately, the impact is very low since this
can only happen when the corresponding tracepoints have been enabled
before, but the problem should be fixed anyway with a proper check.

Buglink: https://bugs.launchpad.net/qemu/+bug/1882065
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200615072629.32321-1-thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/megasas.c