From nobody Thu Jun 16 20:18:44 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 70136856286; Thu, 16 Jun 2022 20:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LPD5c2T6Dz3JKx; Thu, 16 Jun 2022 20:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655410724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s1iGTVL+fchvsT/tSIPP2a85kQQghRBOI5AW23laOso=; b=Yr2Rx7mnR7AMsehvexKs5YLtoDHOvdAGo/5++1VbtwoIihq4ybxOMRb1zQXxErE+rqw0AD x4nlZwPULQKxmgZTWiPpy9ZaweNcXyDpoJuudlHFdfvSmsE2lMeht9LePlVfBxwST7nTiP euc2Q4Kdq1mlq1CysWjBN3QLMhwV8PvR7jKAZnRYB4GKmesjLHmbadXL7hIOBnsuK8GfFZ 7W8ChiGoTcXlbFmjwgaM1cJe8HYpLmyUTepvTDh3APicKN1DfmM1/yGsLr+yEy3Z2aXQhb dLYzVRGNkyIwWsAlDywXZw8Dh0h4aCZdLD0O+DVzPBwW98qZjyggFVzWjk1SmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3463211DE9; Thu, 16 Jun 2022 20:18:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 25GKIiJg019854; Thu, 16 Jun 2022 20:18:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25GKIiWh019853; Thu, 16 Jun 2022 20:18:44 GMT (envelope-from git) Date: Thu, 16 Jun 2022 20:18:44 GMT Message-Id: <202206162018.25GKIiWh019853@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: e16b709e2dcc - main - bhyve: Report an error for invalid UUIDs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e16b709e2dcc45f01cf96b5e7f6d48474feff8d7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655410724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s1iGTVL+fchvsT/tSIPP2a85kQQghRBOI5AW23laOso=; b=BQTgx0sZUJ3xuzqTa/Rd1mKlf4iVQUMXB7w5o1SMgixcWWxmRFOlrQHZx3tTXjGVzfiCyl Ciu8Zqs7YOJVZSKxMQiQU4KprBnhR6KfRQjDb95Xj0GYPi+6eUYjz1TX1flGHMeKOSXYMr cUSXrQhn+YWVEIFR2oGrVpVVaqpPcq7kFuqVT6RCsO4ACplGyAngbDKa+A/8YEYIaYmFJv N2lTohwJmO7FuqT+EfGb8BzHjxLvmOOp67BKjv4LtDHi+yHiarsAukzU43YZbn/sh1EkCb JatGQgb+UGq0GXF69v+ZmqlB54H5CZlWclQZrQ5YnbF/cqfZhr7sWDCbTlbE1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655410724; a=rsa-sha256; cv=none; b=I4XiHIH6Q2Fl1Qe+B1mdgEdD7ND30v7GKDpPGudiLXNZrmNTi9l5YmCBTV51BEvVOUfXml pEkxjgGqCOtChSDGZayxGdLvWQ1u4rZJJ71yAvz4sfYP0j9/GM+uIubrJXvASkZDChelHx LPhP3+93lNXssm6++N3+qA54VQXtggFJCCMY9PkxSBov/GisvsEsNW9RSmD8chMyI9vwxl V9nHDlNr1YcQ5F+cpzbWg1W3Um0FSa6SChEc8svLga/Ga+PqbaN3AE2JLqhECO3+LgFqDe gkKCYicWYCv39M0r9e1viWSnwKEhskBAmYTmrIAvu9OXWmo8QMt+9QO6gbYskg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e16b709e2dcc45f01cf96b5e7f6d48474feff8d7 commit e16b709e2dcc45f01cf96b5e7f6d48474feff8d7 Author: James Mintram AuthorDate: 2022-06-16 20:17:44 +0000 Commit: John Baldwin CommitDate: 2022-06-16 20:18:01 +0000 bhyve: Report an error for invalid UUIDs. Reviewed by: rgrimes, grehan, jhb Differential Revision: https://reviews.freebsd.org/D30050 --- usr.sbin/bhyve/bhyverun.c | 3 ++- usr.sbin/bhyve/smbiostbl.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index a412785f5a01..4f9fc4a2b050 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1536,7 +1536,8 @@ main(int argc, char *argv[]) } error = smbios_build(ctx); - assert(error == 0); + if (error != 0) + exit(4); if (get_config_bool("acpi_tables")) { error = acpi_build(ctx, guest_ncpus); diff --git a/usr.sbin/bhyve/smbiostbl.c b/usr.sbin/bhyve/smbiostbl.c index 97f5a563c6c5..bc85bb6c97af 100644 --- a/usr.sbin/bhyve/smbiostbl.c +++ b/usr.sbin/bhyve/smbiostbl.c @@ -666,8 +666,10 @@ smbios_type1_initializer(struct smbios_structure *template_entry, uint32_t status; uuid_from_string(guest_uuid_str, &uuid, &status); - if (status != uuid_s_ok) + if (status != uuid_s_ok) { + EPRINTLN("Invalid UUID"); return (-1); + } uuid_enc_le(&type1->uuid, &uuid); } else {