From nobody Tue Nov 26 16:24:32 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1706515475; cv=none; d=zohomail.com; s=zohoarc; b=BHm38aSxTBKcIHTP0AifYkcL/fw6x7Bke5B58QcWz4dJfNOY77mRQfEzMafkEruWc6S7vlGATldcmPWvOSJSDzUgLFgzh52CD/TUK0frbLQq/gHr2N5V9esI79I/9nU988tzCJNsDH0KtVqat57Cn8iEKhrZlpW44psY9MuFvBk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1706515475; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=SIxzhhspqMAWnYZrU4WfhbnNIInPUebmookIDK0Fz6g=; b=W0sulMvGzTcLpwZkKj5dq2SfNc4FjxnRRsOeWokyiTudzx/PSd0WDfylf5lbMd3ducdzRfZF20syYX6MOWJNltgz/9Tjus10ZWcTLMI+lOF2hgkh29/dRbBAZbLmi/eTGTxuUmHn77dJK4ZktQz3tI4F3B6T/cJxuZMD3svN5nk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1706515475689574.0838164786978; Mon, 29 Jan 2024 00:04:35 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rUMcM-0000FF-0t; Mon, 29 Jan 2024 03:03:46 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rUMcL-0000F0-1r for qemu-devel@nongnu.org; Mon, 29 Jan 2024 03:03:45 -0500 Received: from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rUMcJ-00056o-F9 for qemu-devel@nongnu.org; Mon, 29 Jan 2024 03:03:44 -0500 Received: by mail-pj1-x1029.google.com with SMTP id 98e67ed59e1d1-29041f26e28so920800a91.0 for ; Mon, 29 Jan 2024 00:03:43 -0800 (PST) Received: from localhost ([2400:4050:a840:1e00:9ac7:6d57:2b16:6932]) by smtp.gmail.com with UTF8SMTPSA id sh9-20020a17090b524900b0028c5585fb41sm5589015pjb.45.2024.01.29.00.03.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 29 Jan 2024 00:03:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1706515422; x=1707120222; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=SIxzhhspqMAWnYZrU4WfhbnNIInPUebmookIDK0Fz6g=; b=zOTM+J/MjUDd8LVcrmXF4upvr1xdhtgNyTeOdM/WvYLAAMcXELVVANPqfyFNaulUPZ cXn3RSSGr5hWJVRC5QowZw2g2GJ6y6I1/XvA05RRfLzNQg705VOkywmVVKkW7xc4Hz/I zkBxMOLKzAdD6/yzFb8OcZJrYJQ0rxi6PP82L7wFSndE5ptuL6RAZLvQK4rkJB1Z6G7v cXP6FbD4wLRsg9NBMlqUgEsL4fUVdWpe/v6v6TkN3GAyppPBsgfWLhHaIfaUNiuYZJxS QPH+diqaTkwCh4ItTd+UsL/5kTKOF80lufU+1IsuGMpWvYvXxMsoGtfWAl8VeW4i3BY6 4lHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706515422; x=1707120222; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SIxzhhspqMAWnYZrU4WfhbnNIInPUebmookIDK0Fz6g=; b=U+1BNgzWY4LX7Hewes7EMJn17eeqjAdCTWVLAcaJ4/FUUjMZfk4DDHCthNVWUsxqUP cCdq95ibA2l+lkV1KgZ0egRq27gqAhudUThVjIbTzrwmxfkn9Tl7btDCAhgxg2/OzP8e P8BfmY5PpzmfS6fGI5vZhhGU9rbw3OTwnQ+idQoCAhOB+2T07mRbwK8Oi4JNs3oY8vN3 kyR/gos40GlyMetDiEPh9GvRqsXM5zK4j7zIU7+ECNJGiIFeBbG9gf46yzI8lmJscPfP AfLnEAGCjdEXCOaQ/4+2RPRsm3TasnYPkpWjk2cgThI66GQNDV4PnLKZovELdFV7+vYL woiQ== X-Gm-Message-State: AOJu0Yw0YEfLzn/8URruE5atskrAyZQDIq57lvaqutna1Kp5WJoop3kK 9M3XFy2Jz7ibXDQ/7PQdwGICkFcUnD1pItB6WqKlF2S8skHVfU+uP7n1lCSE4d4= X-Google-Smtp-Source: AGHT+IEQq1Z30GAddME/mPXWOsvS4eQO3D5lcT3VbySp+Yo6UU7pAh5C/qFQLnjg9wSxbYLh+EJkgQ== X-Received: by 2002:a17:90a:cc04:b0:28d:70b5:fafb with SMTP id b4-20020a17090acc0400b0028d70b5fafbmr1572192pju.32.1706515422004; Mon, 29 Jan 2024 00:03:42 -0800 (PST) From: Akihiko Odaki Date: Mon, 29 Jan 2024 17:03:08 +0900 Subject: [PATCH v2 2/2] hw/smbios: Fix port connector option validation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240129-smbios-v2-2-9ee6fede0d10@daynix.com> References: <20240129-smbios-v2-0-9ee6fede0d10@daynix.com> In-Reply-To: <20240129-smbios-v2-0-9ee6fede0d10@daynix.com> To: "Michael S. Tsirkin" , Igor Mammedov , Ani Sinha , Michael Tokarev Cc: qemu-devel@nongnu.org, qemu-stable@nongnu.org, Akihiko Odaki X-Mailer: b4 0.12.3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::1029; envelope-from=akihiko.odaki@daynix.com; helo=mail-pj1-x1029.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1706515477626100007 qemu_smbios_type8_opts did not have the list terminator and that resulted in out-of-bound memory access. It also needs to have an element for the type option. Cc: qemu-stable@nongnu.org Fixes: fd8caa253c56 ("hw/smbios: support for type 8 (port connector)") Signed-off-by: Akihiko Odaki Reviewed-by: Michael Tokarev Reviewed-by: Ani Sinha --- hw/smbios/smbios.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c index 522ed1ed9fe3..8a44d3f271de 100644 --- a/hw/smbios/smbios.c +++ b/hw/smbios/smbios.c @@ -346,6 +346,11 @@ static const QemuOptDesc qemu_smbios_type4_opts[] =3D { }; =20 static const QemuOptDesc qemu_smbios_type8_opts[] =3D { + { + .name =3D "type", + .type =3D QEMU_OPT_NUMBER, + .help =3D "SMBIOS element type", + }, { .name =3D "internal_reference", .type =3D QEMU_OPT_STRING, @@ -366,6 +371,7 @@ static const QemuOptDesc qemu_smbios_type8_opts[] =3D { .type =3D QEMU_OPT_NUMBER, .help =3D "port type", }, + { /* end of list */ } }; =20 static const QemuOptDesc qemu_smbios_type11_opts[] =3D { --=20 2.43.0