hvmloader: add new SMBIOS tables (7,8,9,26,27,28)
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest4 patches 7 repliesIn review
- v43 patches 10 repliesSuperseded
- v33 patches 1 replySuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 3 patches | 5 replies | Superseded | |
| v1 | 3 patches | 10 replies | Superseded |
Changes in v5 from the cover letter
- Renamed offsetof_end macro to endof_field.
- Added mention in CHANGELOG.md.
- hvmloader: fix SMBIOS table length checks
- Changed table_size parameter name to min_size in the smbios_pt_copy function.
- Fixed typo in smbios_type_2_init function where smbios_type_3 was mistyped.
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | tools: add sizeof_field and endof_field macrostools/ | +5 | 1 reply | |
| 2/4 | hvmloader: fix SMBIOS table length checkstools/ tools/ | +123 | 2 replies | |
| 3/4 | hvmloader: add new SMBIOS tables (7, 8, 9, 26, 27, 28)tools/ tools/ | +188 | 2 replies | |
| 4/4 | CHANGELOG.md: add new SMBIOS tables (7, 8, 9, 26, 27, 28)CHANGELOG.md | +1 | 2 replies |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Jan Beulich | Oleksii Kurochko | Anthony PERARD |
|---|---|---|---|
| 1/4 | A-b | ||
| 2/4 | A-b | ||
| 3/4 | A-b | ||
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v5 0/4] hvmloader: add new SMBIOS tables (7,8,9,26,27,28)
From: Petr Beneš <[email protected]>
Changes since v4:
- Renamed offsetof_end macro to endof_field.
- Added mention in CHANGELOG.md.
- hvmloader: fix SMBIOS table length checks
- Changed table_size parameter name to min_size in the smbios_pt_copy function.
- Fixed typo in smbios_type_2_init function where smbios_type_3 was mistyped.
Changes since v3:
- Renamed offsetofend macro to offsetof_end.
Changes since v2:
- Added sizeof_field and offsetofend macros to common-macros.h.
- Used offsetofend macro everywhere to make semantically sense.
- Added BUILD_BUG_ON to ensure offsets are correct based on the SMBIOS specification (with explanation in the comments).
- Fixed commit message of the second patch to mention the new smbios_pt_copy function.
- Fixed nits (empty lines, misplaced *).
- Retained the original comment "Only present when passed in" + added it to the new tables where applicable.
- Replaced hardcoded offset for chassis_handle in smbios_type_2_init.
Changes since v1:
- Swapped the order of S-o-b in the last commit message.
Resubmitting patch from Anton Belousov and addressing review comments
from Jan: https://old-list-archives.xen.org/archives/html/xen-devel/2022-01/msg00725.html
Original message:
Quoted 7 lines
SMBIOS tables like 7,8,9,26,27,28 are neccessary to prevent sandbox detection by malware using WMI-queries. New tables can be mapped to memory from binary file specified in "
smbios_firmware" parameter of domain configuration. If particular table is absent in binary file, then it will not be mapped to memory. This method works for Windows domains as tables 7,8,9,26,27,28 are not critical for OS boot and runtime. Also if "smbios_firmware" parameter is not provided, these tables will be skipped inwrite_smbios_tablesfunction.
Further explanation:
Some malware samples are known to check presence of various hardware components (like CPU fan, CPU temperature sensor, etc.) by WMI queries. If these components are not present, then malware can assume that it is running in a sandbox and will not execute its payload.
This patch will allow security researchers to create a custom SMBIOS firmware binary file that contains these tables.
Petr Beneš (4):
tools: add sizeof_field and endof_field macros
hvmloader: fix SMBIOS table length checks
hvmloader: add new SMBIOS tables (7, 8, 9, 26, 27, 28) CHANGELOG.md: add new SMBIOS tables (7, 8, 9, 26, 27, 28)
CHANGELOG.md | 1 + tools/firmware/hvmloader/smbios.c | 289 ++++++++++++++++++------ tools/firmware/hvmloader/smbios_types.h | 109 +++++++-- tools/include/xen-tools/common-macros.h | 5 + 4 files changed, 317 insertions(+), 87 deletions(-)
Signature · 1 line
2.34.1