From nobody Sun May 5 09:20:51 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1574257121; cv=none; d=zoho.com; s=zohoarc; b=MV48vyWcfxnmQtKBal5AJc67nR5f1ovccuq/9hiFCCvTeZmFc0KdDPkrzvu866/o2RguGDYTehX6VrPHb6JKFdlsQIPfGzr9gKtxE8382Br5lDTuJX7VS5wUGX54gwYfzmAT/bFBKzspcpc6jRr4C9dgnYdbFeae9Ng/maUZv0g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1574257121; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=+YLf6k1ZHEA70U9XHzxqLu1pE+EiAZeCjz05U7nw/Rw=; b=OFZDIXHo+O75tlGI08h0pJ+lC+1c7uqgmx/h4TXfD9qnzoqf0MWHX+9uaMWoKUV1tyAXGqUW0QJPcuJqm7+3uz2d/sI8ydpMiNy5796PQyU/DoNokHYd17rb8DM+kedPB4vtTQV5vaS1sBxkECe61O6nwUdPSoG3gCK9eCfb8a0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1574257121078846.4972999749215; Wed, 20 Nov 2019 05:38:41 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iXQBA-0003ei-Rc; Wed, 20 Nov 2019 13:37:56 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iXQB9-0003ed-7E for xen-devel@lists.xenproject.org; Wed, 20 Nov 2019 13:37:55 +0000 Received: from mail-wr1-x442.google.com (unknown [2a00:1450:4864:20::442]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id f45855ee-0b9a-11ea-984a-bc764e2007e4; Wed, 20 Nov 2019 13:37:54 +0000 (UTC) Received: by mail-wr1-x442.google.com with SMTP id l7so28188385wrp.6 for ; Wed, 20 Nov 2019 05:37:54 -0800 (PST) Received: from a483e7b01a66.ant.amazon.com (54-240-197-234.amazon.com. [54.240.197.234]) by smtp.gmail.com with ESMTPSA id p14sm32257236wrq.72.2019.11.20.05.37.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2019 05:37:53 -0800 (PST) X-Inumbo-ID: f45855ee-0b9a-11ea-984a-bc764e2007e4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PZWcuY2oN+7Ep3IFvr755UeZnU0DmztJosoXS6XHLDQ=; b=r0Kdwu5/hekm/JlaqdxpSHhcrXrPriUrUihrp6gWGvOwtanUMlJcQ+mZv3b9ngdT64 P8oINEMfJ9vRNGvHYk0zhnmLxr7ct/4dZylXPcg9G9V0XLIH31NJ6qPzFLJHiO9T67Gh y+VQpDuTLpzB0ZQci2HQNtPjatNlIGPriRrIprqs5vqn93t0/R9pj0ONkFx6rrSLTN0/ mdEHcccfTys0H7shslTH+mwrEaYoRIUAr8cQglDIoHQpLKR+ZQc8QQ3Mk5lZE9X0BDlo YbOzsPfGc3cMM1RTczJxXN2xXxX7z18+6w2JqDqwEvS8X/Z0fRRt9amE6ylsIP07avre FuJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=PZWcuY2oN+7Ep3IFvr755UeZnU0DmztJosoXS6XHLDQ=; b=k0j2b8V4V4AF2CQUOFz76qPEJKtKBWkArAvapYEBLWYfzTZqCoqcAKohAT2ShayLRw 4FhqCuPfrUVi0uyu9Yu/bxcevLHzD6zbWjrkGZjcCa+WxB+XXTpHJoQ8fTfxnyzRHcGw Je1wvWbPzQuNgAwNjY4qNbKnAzh9WPlh3ppyabCJ7dpPUQsqsFd2dsh1jz1gept/Na20 NqRUOmYMabIHFZ1hyQpwGuIv39KdEWS7SGt+k0KsIbAtR84xmQymJoFgoGUfRMHD+ltr bnpWPyKB1iQTPgAFGZskDxKb2MDaLsqnLCrC3mtov4YUHxo8l9qZ1fEDr6kcyrvSaYyZ pz0Q== X-Gm-Message-State: APjAAAWC2078vxYogEU1Pd9jWpDVoeKQN7knjLQqkd3vdKGkojul/uK2 L4XwczbwjxhMaHbyM0Axf7lLJv7LAqY= X-Google-Smtp-Source: APXvYqwycI33vGnsiHJSJxc9Y3wsSt+Ega0a5exYQqRNUKZt8CKRKvenbQV1dv5z1N8rly2l1p4dIA== X-Received: by 2002:adf:dcc2:: with SMTP id x2mr3496180wrm.359.1574257073608; Wed, 20 Nov 2019 05:37:53 -0800 (PST) From: Julien Grall X-Google-Original-From: Julien Grall To: xen-devel@lists.xenproject.org Date: Wed, 20 Nov 2019 13:37:51 +0000 Message-Id: <20191120133751.67925-1-jgrall@amazon.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] xen: Add missing va_end() in hypercall_create_continuation() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Stefano Stabellini , Julien Grall , Wei Liu , Andrew Cooper , Jan Beulich , Volodymyr Babchuk , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) From: Julien Grall The documentation requires va_start() to always be matched with a corresponding va_end(). However, this is not the case in the path used for bad format. This was introduced by XSA-296. Coverity-ID: 1488727 Fixes: 0bf9f8d3e3 ("xen/hypercall: Don't use BUG() for parameter checking i= n hypercall_create_continuation()") Signed-off-by: Julien Grall Reviewed-by: Andrew Andrew Cooper Reviewed-by: Jan Beulich --- xen/arch/arm/domain.c | 1 + xen/arch/x86/hypercall.c | 1 + 2 files changed, 2 insertions(+) diff --git a/xen/arch/arm/domain.c b/xen/arch/arm/domain.c index 9e8e9d921d..c0a13aa0ab 100644 --- a/xen/arch/arm/domain.c +++ b/xen/arch/arm/domain.c @@ -467,6 +467,7 @@ unsigned long hypercall_create_continuation( return rc; =20 bad_fmt: + va_end(args); gprintk(XENLOG_ERR, "Bad hypercall continuation format '%c'\n", *p); ASSERT_UNREACHABLE(); domain_crash(current->domain); diff --git a/xen/arch/x86/hypercall.c b/xen/arch/x86/hypercall.c index 4643e5eb43..1d42702c6a 100644 --- a/xen/arch/x86/hypercall.c +++ b/xen/arch/x86/hypercall.c @@ -157,6 +157,7 @@ unsigned long hypercall_create_continuation( return op; =20 bad_fmt: + va_end(args); gprintk(XENLOG_ERR, "Bad hypercall continuation format '%c'\n", *p); ASSERT_UNREACHABLE(); domain_crash(curr->domain); --=20 2.24.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel