From nobody Fri Jan 9 20:17:44 2026 X-Original-To: virtualization@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 4dntP53ljDz6MK90 for ; Fri, 09 Jan 2026 20:17:45 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dntP44gSfz3LHj for ; Fri, 09 Jan 2026 20:17:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989864; 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: in-reply-to:in-reply-to:references:references; bh=hlkzDKG0kEYldOss3bLkVjQra7D143bPe0vZBB2PlZs=; b=my7dAxaSpg8ffCAKxKUXgahClkRP4ucJaxl2U1LD3waNo+TzCfVYjCY7ZPSMpvNvWg3riZ nx0FdfstayK+0nPB/C8omSlYqU7nu+JFHgyZBQey4ejTGpd9TfNj8sEmZE6DNSZRMMKjF2 QYEtbWHrZuZhjlUPu/opd7sybbcWZ0PT4QU3C2QCjgvk8JVxUrO/iBBtJfjVLFjjnp5u1u KN3HqtMs+hB9Ckw47dEVUaFfINUWzwaQx0Ri4WWWI4cRDGyPf9340oV/QsZRZPK38V/Amx 4OoU5HgnqiCacLCLs+eCiNB3AU3mwwPLyyBStlyaeqmW12cM7tfDGh0QbVGS/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1767989864; 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: in-reply-to:in-reply-to:references:references; bh=hlkzDKG0kEYldOss3bLkVjQra7D143bPe0vZBB2PlZs=; b=Mt4c3fu/gyz9oX+H/LbXT+3lQrXMsDVPoyxwPIuw6Rgdfru66/3WaREqbnilkgWvVLxZIN wx/1okbSHbBEmDX1D7h6Y0PPmTD4C63eXd4UnO2E/T0q2zToyHcd9owp6LvpeqGoddrLf5 dsotLX9Hx2AnXfSxz56xe1SgN1Z2aznHAPtsDCQqgoLkuaH0F6uAfCbcTemqksOjVZFucp hj7IzDPXsHW7ayiHrFAZlS7ht8IX4D0LBy1NrUxoB5OoddZpbBVIkHMnqVTYDCCh6w+E/K qZmqs6NUl+aLhb/8OI0ClnRlEd4JsB71fpo49rmN4Bq7VRNus1qa7LdekaMG4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1767989864; a=rsa-sha256; cv=none; b=gfPPPzsrQwp+qqSbqB07gRl+LNIyqIX2hkquWFeZYYr4VyaH5riB9z4OfPMpV4R2T4CtVN AAASPLFF1odcZ0PMXZLr6TK2TB4AXrfKEwGCpcSjsxDdcMACXWBZQ1JRqSv1DPPnMZ8AAi 2ElPZ8vbxgjHpxwO+OJF6ZZ7fI2GzqAb6rT13/gIkpnDin1BkoupcQPatH51u2MrlJpxFq 6etyimLTneLID0fTt/jGL7KqGILvesbW2P/+mLls9A/1QhLFNkhheNY8ANc8xu0WAco5Y7 GsM6TnSITluRIpiS/PG5GJMHoztw61PKV2mR6INVKF++0ob8UzjWX+v7NNNfMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4dntP43QY0z7v9 for ; Fri, 09 Jan 2026 20:17:44 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 609KHix2058110 for ; Fri, 9 Jan 2026 20:17:44 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from bugzilla@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 609KHiOH058106 for virtualization@FreeBSD.org; Fri, 9 Jan 2026 20:17:44 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: bugzilla set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 282237] bhyve: usb_mouse.c segfaults due to incomplete NULL checking Date: Fri, 09 Jan 2026 20:17:44 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: 15.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: commit-hook@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D282237 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D7631790422464de1aec309018e2c444de= fe5f629 commit 7631790422464de1aec309018e2c444defe5f629 Author: Jack Bendtsen AuthorDate: 2025-06-19 07:40:31 +0000 Commit: Warner Losh CommitDate: 2026-01-09 20:17:13 +0000 Fix NULL deref segfault in bhyve's usb_mouse.c Some of the cases inside umouse_request() (usr.sbin/bhyve/usb_mouse.c) use the data component of an event, while only partially checking if it's NULL. 'data' has a NULL check, but then 'data' is immediately deferenced anyway after the check regardless of if it's NULL or not. For example: case UREQ(UR_GET_STATUS, UT_READ_INTERFACE): case UREQ(UR_GET_STATUS, UT_READ_ENDPOINT): DPRINTF(("umouse: (UR_GET_STATUS, UT_READ_INTERFACE)")); if (data !=3D NULL && len > 1) { USETW(udata, 0); data->blen =3D len - 2; data->bdone +=3D 2; } eshort =3D data->blen > 0; break; There are actually four occurrences of this same bug, each in a different case in this switch block. Signed-off-by: Jack Bendtsen PR: 282237 Reviewed by: imp, jhb, vexeduxr MFC After: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1728 usr.sbin/bhyve/usb_mouse.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --=20 You are receiving this mail because: You are the assignee for the bug.=