-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Searching over uninitialized data #6
Comments
While investigating some corruption, I noticed something similar, and made a fix: https://gerrit.openbmc.org/c/openbmc/smbios-mdr/+/69322 |
bradbishop
pushed a commit
that referenced
this issue
Feb 15, 2024
As the currently supported 3.5 standard is a superset of 3.4, according to a glance at the https://www.dmtf.org/standards/smbios spec, enabling support for 3.4 should be as straightforward as simply adding it to this allowlist of supported versions. This change is inspired by the proposed #6 which suggests a similiar change for 3.1 version. The only reason I am not adding 3.1 at the same time here, is that I only have a 3.4 SMBIOS in the machine I am testing now. Tested: The SMBIOS from my host is no longer needlessly rejected for being of 3.4 version. Change-Id: I29bcb872377c87088b2ed4fc0ec90a03d89c15d8 Signed-off-by: Josh Lehan <[email protected]>
bradbishop
pushed a commit
that referenced
this issue
Feb 15, 2024
As the currently supported 3.5 standard is a superset of 3.4, according to a glance at the https://www.dmtf.org/standards/smbios spec, enabling support for 3.4 should be as straightforward as simply adding it to this allowlist of supported versions. This change is inspired by the proposed #6 which suggests a similiar change for 3.1 version. The only reason I am not adding 3.1 at the same time here, is that I only have a 3.4 SMBIOS in the machine I am testing now. Tested: The SMBIOS from my host is no longer needlessly rejected for being of 3.4 version. Change-Id: I29bcb872377c87088b2ed4fc0ec90a03d89c15d8 Signed-off-by: Josh Lehan <[email protected]>
bradbishop
pushed a commit
that referenced
this issue
Feb 15, 2024
As the currently supported 3.5 standard is a superset of 3.4, according to a glance at the https://www.dmtf.org/standards/smbios spec, enabling support for 3.4 should be as straightforward as simply adding it to this allowlist of supported versions. This change is inspired by the proposed #6 which suggests a similar change for 3.1 version. The only reason I am not adding 3.1 at the same time here, is that I only have a 3.4 SMBIOS in the machine I am testing now. Tested: The SMBIOS from my host is no longer needlessly rejected for being of 3.4 version. Change-Id: I29bcb872377c87088b2ed4fc0ec90a03d89c15d8 Signed-off-by: Josh Lehan <[email protected]>
I also made https://gerrit.openbmc.org/c/openbmc/smbios-mdr/+/69457 for adding SMBIOS version 3.4 support. I would add 3.1 at the same time, but I have no 3.1 machine to test on. |
bradbishop
pushed a commit
that referenced
this issue
Feb 21, 2024
As the currently supported 3.5 standard is a superset of 3.4, according to a glance at the https://www.dmtf.org/standards/smbios spec, enabling support for 3.4 should be as straightforward as simply adding it to this allowlist of supported versions. This change is inspired by the proposed #6 which suggests a similar change for 3.1 version. The only reason I am not adding 3.1 at the same time here, is that I only have a 3.4 SMBIOS in the machine I am testing now. Tested: The SMBIOS from my host is no longer needlessly rejected for being of 3.4 version. Change-Id: I29bcb872377c87088b2ed4fc0ec90a03d89c15d8 Signed-off-by: Josh Lehan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have following scenario: I prepend smbios snapshot with proper
MDRSMBIOSHeader
structure at the beginning of/var/lib/smbios/smbios2
with following script on bmc/container side:My first problem was that
smbios-mdr
requires smbios tables of version 3.2 or higher, whereas my snapshot is just 3.1. I was able to add support for this version, but noticed thatMDRV2
constructor does not clear thesmbiosTableStorage
buffer which is used to hold the smbios data from/var/lib/smbios2
andMDRV2::checkSMBIOSVersion
scans whole buffer:smbios-mdr/src/mdrv2.cpp
Lines 657 to 665 in e05a542
Either the real smbios table buffer size should be used in
std::string buffer(dataIn, dataIn + smbiosTableStorageSize)
or the buffer should be cleared in MDRV2 constructor:Even after this change the
checkSMBIOSVersion
is not safe in cases where the_SM_
token is part of the strings section or is present somewhere in the dump.Anyway, if anyone is struggling with smbios 3.1 support, here is a patch to enable it - it is just a workaround which skips the header, it works only for
dmidecode
dumps whereStructure table address
(qword attribute @+0x10) holds the size of the header:The text was updated successfully, but these errors were encountered: