aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorToomas Soome <tsoome@FreeBSD.org>2021-12-26 09:01:16 +0000
committerToomas Soome <tsoome@FreeBSD.org>2021-12-27 18:06:33 +0000
commit04f55b5b0e8f561aac100083f07df3f570880d69 (patch)
treee4889dc24157d33f93e78147681ce37b78f87808 /usr.sbin
parentc2fa905cf6c1cf1938a0353679e3bd0b617ca179 (diff)
downloadsrc-04f55b5b0e8f561aac100083f07df3f570880d69.tar.gz
src-04f55b5b0e8f561aac100083f07df3f570880d69.zip
bhyve smbios type 3 structure is incorrect
If you look at the SMBIOS specification, we'll find something is missing. In particular at offset 0Dh is supposed to be the OEM-defined field. This should go between security and height. It is not legal to actually skip this and will lead to other folks not properly interpreting later parts of the table. https://www.illumos.org/issues/14312 Reviewed by: jhb Submitted by: Robert Mustacchi <rm@fingolfin.org> Obtained from: ilumos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33682
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bhyve/smbiostbl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/bhyve/smbiostbl.c b/usr.sbin/bhyve/smbiostbl.c
index ada3177105a9..2dc50e6e6f01 100644
--- a/usr.sbin/bhyve/smbiostbl.c
+++ b/usr.sbin/bhyve/smbiostbl.c
@@ -199,6 +199,7 @@ struct smbios_table_type3 {
uint8_t psstate; /* power supply state */
uint8_t tstate; /* thermal state */
uint8_t security; /* security status */
+ uint32_t oemdata; /* OEM-specific data */
uint8_t uheight; /* height in 'u's */
uint8_t cords; /* number of power cords */
uint8_t elems; /* number of element records */
@@ -417,6 +418,7 @@ struct smbios_table_type3 smbios_type3_template = {
SMBIOS_CHST_SAFE,
SMBIOS_CHST_SAFE,
SMBIOS_CHSC_NONE,
+ 0, /* OEM specific data, we have none */
0, /* height in 'u's (0=enclosure height unspecified) */
0, /* number of power cords (0=number unspecified) */
0, /* number of contained element records */