VYPR
Unrated severityNVD Advisory· Published Aug 1, 2023· Updated Feb 13, 2025

bhyve privileged guest escape via fwctl

CVE-2023-3494

Description

The fwctl driver implements a state machine which is executed when a bhyve guest accesses certain x86 I/O ports. The interface lets the guest copy a string into a buffer resident in the bhyve process' memory. A bug in the state machine implementation can result in a buffer overflowing when copying this string. Malicious, privileged software running in a guest VM can exploit the buffer overflow to achieve code execution on the host in the bhyve userspace process, which typically runs as root, mitigated by the capabilities assigned through the Capsicum sandbox available to the bhyve process.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

A buffer overflow in bhyve's fwctl interface allows a privileged guest to achieve code execution on the host, affecting FreeBSD 13.1 and 13.2.

Vulnerability

The fwctl interface in bhyve, used when booting guests with the -l bootrom option (e.g., UEFI mode), implements a state machine that processes commands from guest firmware via x86 I/O ports. A bug in this state machine allows a guest to copy a string into a buffer resident in the bhyve process' memory, but the buffer can overflow. This affects FreeBSD 13.1 and 13.2 [1].

Exploitation

An attacker with privileged access to a guest VM (i.e., able to execute code at the hypervisor-privileged level within the guest) can manipulate the I/O port accesses triggered by the state machine. By crafting specific sequences, the attacker causes the copy operation to exceed the allocated buffer size, resulting in a buffer overflow [1]. The attack requires the guest to be configured with the bootrom interface active.

Impact

Successful exploitation allows the attacker to achieve code execution on the host in the bhyve userspace process, which typically runs as root. However, bhyve is constrained by the Capsicum sandbox, limiting the capabilities available to the compromised process [1]. This could lead to further host compromise depending on the sandbox restrictions and kernel mitigations.

Mitigation

FreeBSD has released patches for CVE-2023-3494: fixed in stable/13 (13.2-STABLE), 13.2-RELEASE-p2, and 13.1-RELEASE-p9. Users should upgrade to a patched version. No workaround is available; bhyve guests running without the -l bootrom option are not affected [1].

AI Insight generated on May 25, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

2

News mentions

0

No linked articles in our index yet.