From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LSd30-0007dx-Pn for qemu-devel@nongnu.org; Thu, 29 Jan 2009 14:59:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LSd2z-0007b8-4z for qemu-devel@nongnu.org; Thu, 29 Jan 2009 14:59:34 -0500 Received: from [199.232.76.173] (port=54760 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LSd2y-0007an-O7 for qemu-devel@nongnu.org; Thu, 29 Jan 2009 14:59:32 -0500 Received: from e3.ny.us.ibm.com ([32.97.182.143]:41155) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LSd2y-0008Dv-CH for qemu-devel@nongnu.org; Thu, 29 Jan 2009 14:59:32 -0500 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e3.ny.us.ibm.com (8.13.1/8.13.1) with ESMTP id n0TJvehF019967 for ; Thu, 29 Jan 2009 14:57:40 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0TJxVc9128416 for ; Thu, 29 Jan 2009 14:59:31 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n0TJxUmO015774 for ; Thu, 29 Jan 2009 14:59:30 -0500 Received: from squirrel.codemonkey.ws (sig-9-65-71-35.mts.ibm.com [9.65.71.35]) by d01av04.pok.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n0TJxUcG015680 for ; Thu, 29 Jan 2009 14:59:30 -0500 Message-ID: <49820A94.7010207@us.ibm.com> Date: Thu, 29 Jan 2009 13:59:16 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] check SCSI read/write requests against max LBA References: <20090129115456.2593238b@bree.surriel.com> In-Reply-To: <20090129115456.2593238b@bree.surriel.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Rik van Riel wrote: > The bdrv layer uses a signed offset. Furthermore, block-raw-posix > only seeks when that offset is positive. Passing a negative offset > to block-raw-posix can result in data being written at the current > seek cursor's position. > > It may be possible to exploit this to seek to the end of the disk > and extend the virtual disk by writing data to a negative sector > offset. After a reboot, this could lead to the guest having a > larger disk than it had before. > > Close the hole by sanity checking the lba against the size of the > disk. > > Signed-off-by: Rik van Riel > Applied. Thanks. Regards, Anthony Liguori