From nobody Tue Nov 26 13:24:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1574326738; cv=none; d=zoho.com; s=zohoarc; b=gHarlunv25OXQYy+0Ftzu6VlC2v3DPMDNNxupc0xI0/Q5OUG/WJMCFpoJHy0D30xC/PJeG4cgkf/R7wcL3bh71tTX0tNbamqdwF/Nf00fG3gJPprXOZckGmIGSXOYVKPHO/SuPhQG/Qk5qjwyUT5aIK7/NYJxhGlLD9kc25OJfk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574326738; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=UGG+aKl9jPsZqFz0koyT8D8xPO3hpkvlOq4gXxyZknU=; b=ogM1DC30CnghcDx7pS3461hSyGj6qZ4fB45VU++GKei/J7RwBWzJcKE88t4oKG4bBt+yQK/NJ5pnPqfbNSsVjAjykcIFUAoFkKA/rkydIUOXWfEEdGtsBWiL+YrRjwb/pWrnWgtXsAPzukrgIetc6Kwj6KSAj7HEXRK3R60Buew= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1574326738923745.3609933525793; Thu, 21 Nov 2019 00:58:58 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-270-lqjRDxvMNNCc3lgaGjTn4g-1; Thu, 21 Nov 2019 03:58:55 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 02AAEDBF6; Thu, 21 Nov 2019 08:58:51 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CBA2F4139; Thu, 21 Nov 2019 08:58:50 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 801BC4E562; Thu, 21 Nov 2019 08:58:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id xAL8wcFN000710 for ; Thu, 21 Nov 2019 03:58:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id C8DE153E1D; Thu, 21 Nov 2019 08:58:38 +0000 (UTC) Received: from ridgehead.redhat.com (unknown [10.43.2.116]) by smtp.corp.redhat.com (Postfix) with ESMTP id 272BD53E19; Thu, 21 Nov 2019 08:58:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574326737; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=UGG+aKl9jPsZqFz0koyT8D8xPO3hpkvlOq4gXxyZknU=; b=UIo4cwE8qJtQ4JbcuSt7OF2TYvJ70OQlUdng1FqfVjgZrminJLjsTa7Vi0L1n3t+W2ImY/ RBG5xX5PWuYOW/PDwAha+kkF+oUPOa5fpj+2Z6I38wqxRvzbUyxHlVf0fCCDiY3aatYBXV CI7cXs9yIBmej7XgDhAHrcK7rtTxDIU= From: Erik Skultety To: libvir-list@redhat.com Date: Thu, 21 Nov 2019 09:58:31 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Erik Skultety Subject: [libvirt] [PATCH v2 3/4] remote: Add a check for zero sized client-side buffers X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: lqjRDxvMNNCc3lgaGjTn4g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Adjustment to the dispatch code which is not generated by gendispatch.pl. Signed-off-by: Erik Skultety --- src/remote/remote_daemon_dispatch.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon= _dispatch.c index f369ffb02a..1d75ec3d37 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -2753,6 +2753,12 @@ remoteDispatchDomainGetVcpuPinInfo(virNetServerPtr s= erver G_GNUC_UNUSED, goto cleanup; } =20 + if (args->ncpumaps =3D=3D 0) { + ret->cpumaps.cpumaps_len =3D 0; + rv =3D 0; + goto cleanup; + } + if (INT_MULTIPLY_OVERFLOW(args->ncpumaps, args->maplen) || args->ncpumaps * args->maplen > REMOTE_CPUMAPS_MAX) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("maxinfo * maplen >= REMOTE_CPUMAPS_MAX")); --=20 2.23.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list