aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/ipl.h
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2015-11-06 09:58:06 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-11-11 09:07:06 +0100
commite0bedada3a497d0640dd5db93e7ad0735f487492 (patch)
tree1fa92c6b1d86812f47d80a593941d8d8abdc1805 /arch/s390/include/asm/ipl.h
parents390/pci_dma: improve debugging of errors during dma map (diff)
downloadlinux-dev-e0bedada3a497d0640dd5db93e7ad0735f487492.tar.xz
linux-dev-e0bedada3a497d0640dd5db93e7ad0735f487492.zip
s390/ipl: fix out of bounds access in scpdata_write
The input buffer in reipl_fcp_scpdata_write is accessed out of bounds when an offset is specified. The problem is that the offset refers to the data we should write to and not to the buffer we read from. So instead of memcpy(scp_data, buf + off, count); we could just do memcpy(scp_data + off, buf, count); However we not only modify the data but also store its length. For this to work we'd need to remember a state per open FH. Since that's not possible with sysfs callbacks let's just fail when an offset is specified. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Acked-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/ipl.h')
0 files changed, 0 insertions, 0 deletions