aboutsummaryrefslogtreecommitdiff
path: root/qmp.c
diff options
context:
space:
mode:
authorPrasad J Pandit <pjp@fedoraproject.org>2016-06-06 22:04:43 +0530
committerPaolo Bonzini <pbonzini@redhat.com>2016-06-06 18:57:15 +0200
commitff589551c8e8e9e95e211b9d8daafb4ed39f1aec (patch)
treef69445ba7c289117434875f104dbaf65f9ab0a5b /qmp.c
parent4b3eec91b90346c57ec99694ddc806b70a54ff90 (diff)
downloadqemu-ff589551c8e8e9e95e211b9d8daafb4ed39f1aec.zip
qemu-ff589551c8e8e9e95e211b9d8daafb4ed39f1aec.tar.gz
qemu-ff589551c8e8e9e95e211b9d8daafb4ed39f1aec.tar.bz2
scsi: esp: check TI buffer index before read/write
The 53C9X Fast SCSI Controller(FSC) comes with internal 16-byte FIFO buffers. One is used to handle commands and other is for information transfer. Three control variables 'ti_rptr', 'ti_wptr' and 'ti_size' are used to control r/w access to the information transfer buffer ti_buf[TI_BUFSZ=16]. In that, 'ti_rptr' is used as read index, where read occurs. 'ti_wptr' is a write index, where write would occur. 'ti_size' indicates total bytes to be read from the buffer. While reading/writing to this buffer, index could exceed its size. Add check to avoid OOB r/w access. Reported-by: Huawei PSIRT <psirt@huawei.com> Reported-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-Id: <1465230883-22303-1-git-send-email-ppandit@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qmp.c')
0 files changed, 0 insertions, 0 deletions