]> Git Repo - qemu.git/commit
ssd0323: fix buffer overun on invalid state load
authorMichael S. Tsirkin <[email protected]>
Thu, 3 Apr 2014 16:52:05 +0000 (19:52 +0300)
committerJuan Quintela <[email protected]>
Mon, 5 May 2014 20:15:02 +0000 (22:15 +0200)
commitead7a57df37d2187813a121308213f41591bd811
treeeb9bb03708905e2906085689c7c1a7f46c0c8ab5
parentcaa881abe0e01f9931125a0977ec33c5343e4aa7
ssd0323: fix buffer overun on invalid state load

CVE-2013-4538

s->cmd_len used as index in ssd0323_transfer() to store 32-bit field.
Possible this field might then be supplied by guest to overwrite a
return addr somewhere. Same for row/col fields, which are indicies into
framebuffer array.

To fix validate after load.

Additionally, validate that the row/col_start/end are within bounds;
otherwise the guest can provoke an overrun by either setting the _end
field so large that the row++ increments just walk off the end of the
array, or by setting the _start value to something bogus and then
letting the "we hit end of row" logic reset row to row_start.

For completeness, validate mode as well.

Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
hw/display/ssd0323.c
This page took 0.025055 seconds and 4 git commands to generate.