From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4h3T-00011k-DR for qemu-devel@nongnu.org; Tue, 08 Jul 2014 21:52:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X4h3O-0001dA-5c for qemu-devel@nongnu.org; Tue, 08 Jul 2014 21:52:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X4h3N-0001ct-SV for qemu-devel@nongnu.org; Tue, 08 Jul 2014 21:52:14 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s691qCPS021918 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 8 Jul 2014 21:52:13 -0400 Message-ID: <53BCA04C.70204@redhat.com> Date: Tue, 08 Jul 2014 19:52:12 -0600 From: Eric Blake MIME-Version: 1.0 References: <53B85AD2.2090706@redhat.com> <1404825299-2827-1-git-send-email-kwolf@redhat.com> In-Reply-To: <1404825299-2827-1-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vVjDdFQdcjtWsfeOsmOaF1BM4Sqw65uw5" Subject: Re: [Qemu-devel] [PATCH v2 for-2.1 3/4] qed: Make qiov match request size until backing file EOF List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-devel@nongnu.org Cc: stefanha@redhat.com, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --vVjDdFQdcjtWsfeOsmOaF1BM4Sqw65uw5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 07/08/2014 07:14 AM, Kevin Wolf wrote: > If a QED image has a shorter backing file and a read request to > unallocated clusters goes across EOF of the backing file, the backing > file sees a shortened request and the rest is filled with zeros. > However, the original too long qiov was used with the shortened request= =2E >=20 > This patch makes the qiov size match the request size, avoiding a > potential buffer overflow in raw-posix. >=20 > Signed-off-by: Kevin Wolf > --- > block/qed.c | 38 ++++++++++++++++++++++++++++++-------- > block/qed.h | 1 + > 2 files changed, 31 insertions(+), 8 deletions(-) >=20 Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --vVjDdFQdcjtWsfeOsmOaF1BM4Sqw65uw5 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTvKBMAAoJEKeha0olJ0NqdCYH/2L/RjYR71+8mwKKnnZg4Zwz HV/9HO7IOqvqvu+ZAKJiKdW+BoGth1XyeMMMAwx3j/duBdCncgDbavyj9clxKq/l KTPPAPdCfdhZS7fPcDZxOIMtWDvIxH54dxiKEgss6ihxmPkYWqQf3ghRz0cgnZMv pncY8tgUmpK+3jiAsuS37gBS3osKd9d6lWb1hKiKKksWc4ZTCaT71VBWxHEqP6S0 C/11fX7EK7MMRNs2VMa88eFSPPZJUcFXcD64/LO3YEyIA0jF4Q3rOAsp5FnQLdmm CxCs8TXcxDmu7gcv1DMcMgnIUVqqgFTInh3cuuzAmv4GpHLra2AnkFAz0Vy1tws= =bT1K -----END PGP SIGNATURE----- --vVjDdFQdcjtWsfeOsmOaF1BM4Sqw65uw5--