]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
ide/atapi: Fix START STOP UNIT command completion (CVE-2015-5154)
authorKevin Wolf <kwolf@redhat.com>
Mon, 27 Jul 2015 03:42:53 +0000 (23:42 -0400)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Wed, 29 Jul 2015 15:34:52 +0000 (15:34 +0000)
The command must be completed on all code paths. START STOP UNIT with
pwrcnd set should succeed without doing anything.

upstream-commit-id: 03441c3a4a42beb25460dd11592539030337d0f8

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/ide/atapi.c

index c63b7e556e0fb2af35da089cb024b118ee937a6d..2887b0f417ebbc3bfdc2c7fdd6467a0b6e0f8a72 100644 (file)
@@ -880,6 +880,7 @@ static void cmd_start_stop_unit(IDEState *s, uint8_t* buf)
 
     if (pwrcnd) {
         /* eject/load only happens for power condition == 0 */
+        ide_atapi_cmd_ok(s);
         return;
     }