Received: from eggs.gnu.org ([2001:4830:134:3::10]:49210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMp3d-0006nA-85 for qemu-devel@nongnu.org; Sat, 14 Feb 2015 21:35:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMp3Y-0000SY-Kj for qemu-devel@nongnu.org; Sat, 14 Feb 2015 21:35:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34798) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMp3Y-0000SG-9Z for qemu-devel@nongnu.org; Sat, 14 Feb 2015 21:35:36 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1F2ZZvZ008071 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 14 Feb 2015 21:35:35 -0500 Date: Sun, 15 Feb 2015 02:43:32 +0008 From: Jason Wang Message-Id: <1423967732.10674.1@smtp.corp.redhat.com> In-Reply-To: <54DE637E.7070007@redhat.com> References: <1423710317-15832-1-git-send-email-jasowang@redhat.com> <54DE637E.7070007@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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: Paolo Bonzini Cc: qemu-devel 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