Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O49DZ-0001OR-Uw for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:54:06 -0400 Received: from [140.186.70.92] (port=45524 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O49DU-0001Jy-PP for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:54:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O49DR-0001zd-Js for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:54:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65259) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O49DR-0001yv-4e for qemu-devel@nongnu.org; Tue, 20 Apr 2010 04:53:57 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3K8rtW9007371 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 20 Apr 2010 04:53:56 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 0/4]: QMP: Fix segfault in bad input References: <1270664710-3948-1-git-send-email-lcapitulino@redhat.com> Date: Tue, 20 Apr 2010 10:53:53 +0200 In-Reply-To: <1270664710-3948-1-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Wed, 7 Apr 2010 15:25:06 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org Luiz Capitulino writes: > First, we do some QError usage cleanup in handle_qmp_command() and then > really fix the bug in the last patch. The bug is that we neglect to check that command object member "arguments" is an object before we access its members. Crashes when it's not an object. The rest of the patch series tweaks diagnostics of malformed command objects: * Split QERR_QMP_BAD_INPUT_OBJECT_MEMBER off QERR_QMP_BAD_INPUT_OBJECT. I don't care for that at all. These errors are all of the "hello client, you're too broken to live, go away" kind. Clients won't be able to do anything useful with a fine-grained error class there. * Improve the human-readable messages. This could be occasionally useful for debugging, I guess. That said, I'm not opposed to merging as is. There's plenty of useless error detail already, with more to come, so adding to the pile doesn't bother me.