From 51fd36f69fa0f8dfeb51ca1dfd9488f3a2fa602c Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Sun, 26 Jul 2015 23:42:53 -0400 Subject: [PATCH] ide/atapi: Fix START STOP UNIT command completion (CVE-2015-5154) 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 Reviewed-by: John Snow Signed-off-by: Stefano Stabellini --- hw/ide/atapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index f7d2009c0..be000545d 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -879,6 +879,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; } -- 2.39.5