-----BEGIN PGP SIGNED MESSAGE-----
FreeBSD-EN-21:25.bhyve Errata Notice
The FreeBSD Project
Topic: Fix NVMe iovec construction for large IOs
Affects: FreeBSD 12.2 and later.
Corrected: 2021-07-09 14:24:14 UTC (stable/13, 13.0-STABLE)
2021-08-24 17:25:47 UTC (releng/13.0, 13.0-RELEASE-p4)
2021-07-09 14:25:45 UTC (stable/12, 12.2-STABLE)
2021-08-24 18:32:11 UTC (releng/12.2, 12.2-RELEASE-p10)
For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit
bhyve(8) is a hypervisor that supports running a variety of guest
operating systems in virtual machines. Newer UEFI code in Red Hat
Enterprise Linux (RHEL) 8.4 and later (as well as applicable variants)
will not boot in newly installed guests.
II. Problem Description
By default, NVMe data transfer operations use a scatter-gather list in
which all entries point to a fixed-size memory region. For example, if
the memory page size is 4KB, a 2MB IO requires 512 entries. Lists
themselves are also fixed in size (default is 512 entries).
Because the list size is fixed, the last entry is special. If the IO
requires more than 512 entries, the last entry in the list contains the
address of the next list of entries. But if the IO requires exactly 512
entries, the last entry points to data.
The NVMe emulation missed this logic and unconditionally treated the
last entry as a pointer to the next list.
When a RHEL 8.4 and later (or variants) are installed as guests within
bhyve(8) on emulated NVMe storage, the system will not boot due to a
newer UEFI driver that is included with these distributions.
Installation of a RHEL 8.3 guest and performing an in-place upgrade.
Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date.
Perform one of the following:
1) To update your system via a binary patch:
Systems running a RELEASE version of FreeBSD on the amd64, i386, or
(on FreeBSD 13 and later) arm64 platforms can be updated via the
# freebsd-update fetch
# freebsd-update install
2) To update your system via a source code patch:
The following patches have been verified to apply to the applicable
FreeBSD release branches.
a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.
# fetch https://security.FreeBSD.org/patches/EN-21:25/bhyve.patch
# fetch https://security.FreeBSD.org/patches/EN-21:25/bhyve.patch.asc
# gpg --verify bhyve.patch.asc
b) Apply the patch. Execute the following commands as root:
# cd /usr/src
# patch < /path/to/patch
c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html
VI. Correction details
This issue is corrected by the corresponding Git commit hash or Subversion
revision number in the following stable and release branches:
Branch/path Hash Revision
stable/13/ a7761d19dacd stable/13-n246220
releng/13.0/ 4f590ee3ed7e releng/13.0-n244755
For FreeBSD 13 and later:
Run the following command to see which files were modified by a
# git show --stat <commit hash>
Or visit the following URL, replacing NNNNNN with the hash:
To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:
# git rev-list --count --first-parent HEAD
For FreeBSD 12 and earlier:
Run the following command to see which files were modified by a particular
revision, replacing NNNNNN with the revision number:
# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base
Or visit the following URL, replacing NNNNNN with the revision number:
The latest revision of this advisory is available at
-----BEGIN PGP SIGNATURE-----
-----END PGP SIGNATURE-----
To unsubscribe, send any mail to "freebsd-announ...@freebsd.org