Received: from eggs.gnu.org ([2001:4830:134:3::10]:58715) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buQTJ-0005b6-V1 for qemu-devel@nongnu.org; Wed, 12 Oct 2016 16:49:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buQTG-00028f-Bm for qemu-devel@nongnu.org; Wed, 12 Oct 2016 16:49:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buQTG-00028I-4j for qemu-devel@nongnu.org; Wed, 12 Oct 2016 16:49:50 -0400 References: <6aefc5ee17ba6ac636de56bba8e7f24fd0262187.1475990063.git.liqiang6-s@360.cn> <20161010105603.132a5d53@bahia> <20161012152308.5549fa32@bahia> From: Eric Blake Message-ID: <62702952-e2d8-fb96-0ed8-94729cd65c4c@redhat.com> Date: Wed, 12 Oct 2016 15:49:46 -0500 MIME-Version: 1.0 In-Reply-To: <20161012152308.5549fa32@bahia> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qTWumQ2BWCll0gas0Bq7XJvqfxVIs6Bqb" Subject: Re: [Qemu-devel] [PATCH 1/2] 9pfs: fix information leak in xattr read List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Kurz , Li Qiang Cc: Li Qiang , qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qTWumQ2BWCll0gas0Bq7XJvqfxVIs6Bqb From: Eric Blake To: Greg Kurz , Li Qiang Cc: Li Qiang , qemu-devel@nongnu.org Message-ID: <62702952-e2d8-fb96-0ed8-94729cd65c4c@redhat.com> Subject: Re: [Qemu-devel] [PATCH 1/2] 9pfs: fix information leak in xattr read References: <6aefc5ee17ba6ac636de56bba8e7f24fd0262187.1475990063.git.liqiang6-s@360.cn> <20161010105603.132a5d53@bahia> <20161012152308.5549fa32@bahia> In-Reply-To: <20161012152308.5549fa32@bahia> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10/12/2016 08:23 AM, Greg Kurz wrote: >=20 > But in fact, I'm afraid we have a more serious problem here... size > comes from the guest and could cause g_malloc() to abort if QEMU has > reached some RLIMIT... we need to call g_try_malloc0() and return > ENOMEM if the allocation fails. Even if it does not cause an ENOMEM failure right away, the guest can also use this to chew up lots of host resources. It may also be worth putting a reasonable cap at the maximum the guest can allocate, rather than just trying to malloc every possible size. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qTWumQ2BWCll0gas0Bq7XJvqfxVIs6Bqb Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJX/qHqAAoJEKeha0olJ0NqG0kIAI+DURYqB654s9yVWYJqsISJ ctoYz1nzOfkfBUVwgJhupzU6g2zTSm7MWm7UBjg8gnVHGYGdujk3X+6ZYQGWIkY2 0gzWotOcWUvtm+wqdSqvS0FiSiDgGGcMJQKsyWQlmHsThNKGN+haPIIgN4cFyd34 1FU2yl+5jIYPCJGMxxaZxoJ2Z45zEbw4Hbltoj/9FEkgNh7kF+MZxjT1NC7dBrvH nIHUs1f8J3eoiaU1DhzEAiJ9g3T6raQqf/WZY42eMw0bQAd1ayoPYko0J843U+bJ ckXy+a7mlbfyww1+MH9mvWVCg3/r76L/vuvNRxlIuFaRPtGVCeyUrmPe1WjibwY= =fGpo -----END PGP SIGNATURE----- --qTWumQ2BWCll0gas0Bq7XJvqfxVIs6Bqb--