From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLdVj-0000Fg-JI for qemu-devel@nongnu.org; Sun, 24 Aug 2014 15:31:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XLdVY-0003mx-Iz for qemu-devel@nongnu.org; Sun, 24 Aug 2014 15:31:31 -0400 Received: from mx-v6.kamp.de ([2a02:248:0:51::16]:59962 helo=mx01.kamp.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XLdVY-0003ln-8O for qemu-devel@nongnu.org; Sun, 24 Aug 2014 15:31:20 -0400 Message-ID: <53FA3D82.4090402@kamp.de> Date: Sun, 24 Aug 2014 21:31:14 +0200 From: Peter Lieven MIME-Version: 1.0 References: <00c425bd67fc66567dc683205f8f60f7.squirrel@ssl.dlhnet.de> <53F6F3DD.2090804@kamp.de> <20140822084246.GA32377@noname.redhat.com> <53FA1327.5020808@redhat.com> In-Reply-To: <53FA1327.5020808@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Fwd: [PATCH v4 07/21] iscsi: Handle failure for potentially large allocations] List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , Kevin Wolf Cc: benoit.canet@irqsave.net, maxa@catit.be, qemu-devel@nongnu.org, stefanha@redhat.com Am 24.08.2014 um 18:30 schrieb Paolo Bonzini: > Il 22/08/2014 10:42, Kevin Wolf ha scritto: >>> Unfortunately, I missed that one. The zeroblock is typicalls 512 Byte or 4K depending >>> on the blocksize. >> I don't remember the details, but I think when I went through all >> drivers, I couldn't convince myself that a reasonable block size is >> enforced somewhere. So I just went ahead and converted the call to be on >> the safe side. It can never hurt anyway. > Yeah, a malicious iSCSI target could have unreasonable block sizes. Maybe we should just allow 512b or 4kb blocksize and refuse all other? Peter > > This means the minimum transfer size for SCSI devices could be on the > order of half a GiB, and that could cause other unbounded allocations in > the read-modify-write code. Are those protected too? > > Paolo