Received: from eggs.gnu.org ([2001:4830:134:3::10]:53330) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfAWh-0006YQ-1r for qemu-devel@nongnu.org; Wed, 31 Aug 2016 14:46:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bfAWV-0003QJ-SM for qemu-devel@nongnu.org; Wed, 31 Aug 2016 14:46:13 -0400 Received: from indium.canonical.com ([91.189.90.7]:33475) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bfAWV-0003QF-MS for qemu-devel@nongnu.org; Wed, 31 Aug 2016 14:46:07 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.76 #1 (Debian)) id 1bfAWV-0001Mr-3T for ; Wed, 31 Aug 2016 18:46:07 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 1829E2E8005 for ; Wed, 31 Aug 2016 18:46:07 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Wed, 31 Aug 2016 18:36:29 -0000 From: John Snow <786208@bugs.launchpad.net> Reply-To: Bug 786208 <786208@bugs.launchpad.net> Sender: bounces@canonical.com References: <20110521152806.22761.57475.malonedeb@wampee.canonical.com> Message-Id: <20160831183630.26293.78800.launchpad@gac.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 786208] Re: Missing checks for non-existent device in ide_exec_cmd List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ** Changed in: qemu Assignee: (unassigned) =3D> John Snow (jnsnow) -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/786208 Title: Missing checks for non-existent device in ide_exec_cmd Status in QEMU: New Bug description: Several calls in the ide_exec_cmd handler are missing checks for (!s->bs) or similar, resulting in NULL pointer dereferences, divide- by-zero, or possibly other badness if the guest performs operations on a non-existent IDE master. For example, the WIN_READ_NATIVE_MAX command does a 'ide_set_sector(s, s->nb_sectors - 1);', which does 'cyl =3D sector_num / (s->heads * s->sectors);', which will fail with a divide-by-zero if heads =3D sectors =3D 0. And WIN_MULTREAD also does not check for s->bs, but does a 'ide_sector_read(s);', which will do 'bdrv_read(s->bs, sector_num, s->io_buffer, n);' on a NULL s->bs, leading to a segfault. I do not *believe* that a malicious guest can do anything more than cause a crash with these bugs. To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/786208/+subscriptions