From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNI05-0008LK-OT for qemu-devel@nongnu.org; Mon, 16 Feb 2015 04:30:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YNI01-0002B8-Jb for qemu-devel@nongnu.org; Mon, 16 Feb 2015 04:29:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YNI01-0002Aw-Co for qemu-devel@nongnu.org; Mon, 16 Feb 2015 04:29:53 -0500 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 t1G9Tpec027423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 16 Feb 2015 04:29:52 -0500 Message-ID: <54E1B88B.9010403@redhat.com> Date: Mon, 16 Feb 2015 10:29:47 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1423710317-15832-1-git-send-email-jasowang@redhat.com> <54DE637E.7070007@redhat.com> <1423967732.10674.1@smtp.corp.redhat.com> In-Reply-To: <1423967732.10674.1@smtp.corp.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] virtio: validate the existence of handle_output before calling it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: qemu-devel On 15/02/2015 03:35, Jason Wang wrote: > > > On Sat, Feb 14, 2015 at 4:50 AM, Paolo Bonzini wrote: >> >> >> On 12/02/2015 04:05, Jason Wang wrote: >>> We don't validate the existence of handle_output which may let a buggy >>> guest to trigger a SIGSEV easily. Fix this by validate its existence >>> before. >>> >>> Cc: qemu-stable@nongnu.org >>> Cc: Anthony Liguori >>> Cc: Michael S. Tsirkin >>> Signed-off-by: Jason Wang >> >> Which queue was causing this? >> >> Paolo > > The queue that was not used by the device. Though qemu does not use > them, but it allows guest to do some basic programming. e.g: (for 1q > virtio-net) > > 1) write 10 to queue_sel > 2) setup an arbitrary pfn > 3) then notify queue 10 Oh, I see. Reviewed-by: Paolo Bonzini