aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla1280.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2011-06-03 10:57:34 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-06-29 13:09:56 -0400
commitdb111e18ec19bbadbf44a60f73bf2ff5991dc915 (patch)
treef6c18c036be2c0db91c432b80ad8f7c38e40200e /drivers/scsi/qla1280.c
parentc2dd32e02648d77466f320d6edd157b5080e7c99 (diff)
[SCSI] hpsa: fix potential overrun while memcpy'ing sense data
This memcpy: memcpy(cmd->sense_buffer, ei->SenseInfo, ei->SenseLen > SCSI_SENSE_BUFFERSIZE ? SCSI_SENSE_BUFFERSIZE : ei->SenseLen); The ei->SenseLen field is filled in by the Smart Array. For requests to logical drives, it will not exceed 32 bytes, so should be ok, but for physical requests it depends on the target device, not the Smart Array. It's conceivable that this could exceed the 32 byte size of ei->SenseInfo. In that case, the memcpy would read past the end of ei->SenseInfo, copying data from the next command, as if it were sense data, or, if it happened to be the very last command in the block of allocated commands, could fall off the end of the allocated area and crash. I'm not aware of anyone ever encountering this behavior, but it could conceivably happen. This bug was found by Coverity. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla1280.c')
0 files changed, 0 insertions, 0 deletions