From nobody Thu Jun 09 09:32:02 2022 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 A06FF854545 for ; Thu, 9 Jun 2022 09:32:03 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LJf4g35P9z4hy5 for ; Thu, 9 Jun 2022 09:32:03 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) 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 4BB57218E5 for ; Thu, 9 Jun 2022 09:32:03 +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 2599W36F007367 for ; Thu, 9 Jun 2022 09:32:03 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 2599W38V007366 for virtualization@FreeBSD.org; Thu, 9 Jun 2022 09:32:03 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 264567] bhyve's e82545_transmit() can index beyond the end of the tx descriptors Date: Thu, 09 Jun 2022 09:32:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bhyve X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rtm@lcs.mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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: Sender: owner-freebsd-virtualization@freebsd.org X-BeenThere: freebsd-virtualization@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1654767123; 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=mKjuToPLl7fYKAT4R232QNzDjzl4A603RBQyLEZzn4Y=; b=UzKUNQJRhR40zKosoJyxhSOh3bTPI3ebNzQ0I1uWkalOyvO36w9g4zU704iwighcMcVNT2 6tqFJC8FiJMUOjJYvzL15x5Wm0q0597r+gQWytMVSYFCC08s9gtaE2+56pIzeyKVKJGQJZ DwXZaC33qtHjnBJH+KAqAfjUfb8tOICK2vuRJM7r/h1aFM0L6W35LVwmmS9/CBh1uhhOps 49WoCvBFAhlWXztErPG5gC8677hRWmKVZHdX2uiPxhn1GX3afDtrKvIQAySS/DzsNzJvqg 68lKaLhH5d1r8WEV4E7k8dpZhKHh2WBbNuw5P9r3ZgII+WmZccJI90wDcYrqSA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1654767123; a=rsa-sha256; cv=none; b=qW7DUrNyqSlT23St3yKODd4o40XXLrBjfjRA4Sv5FCtoYvqnJ5iTiJsHEkAmI1tP8M5xAc maEbWodDphP9+BvPBGtSIa/FpZqmR3KvHbBFtdUIAB85LQJaIP/k2Jvz6auZkUxfs/sWep f6PgJESfWSM5zR2cHhUATo4p9QeyrU7fP3gDDjh0VkzztZg4B2to358fgUIH8SphMc40F/ HobxG8rRq2u7UeYbVozBRJiFeU630Ws+ReyeFb5Usm2xzoZC9BRA3TJ0r9Hbc3K/veYSzI 6KGPE7AIIgjToAhnpTwE1+ofWjvLw6zRAsCmx4AeUnw+KNtjSI9U4o1Nj7gFJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D264567 Bug ID: 264567 Summary: bhyve's e82545_transmit() can index beyond the end of the tx descriptors Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bhyve Assignee: virtualization@FreeBSD.org Reporter: rtm@lcs.mit.edu When it is first executed, e82545_tx_run() passes whatever it finds in sc->esc_TDH to e82545_transmit() as the head index, and the latter uses the index without any check: dsc =3D &sc->esc_txdesc[head]; The guest can specify any 16-bit TDH by writing the E1000_TDH(0) register. So it can cause e82545_transmit() to try to read a host address up to a megabyte beyond the end of guest memory. And can cause e82545_transmit_done() to try to write there. --=20 You are receiving this mail because: You are the assignee for the bug.=