Skip to content

Commit f0de40a

Browse files
authored
Merge pull request #617 from Scrut1ny/patch-1
Add FADT Hypervisor Vendor Identity check to VM::FIRMWARE
2 parents 2e3ef76 + 71345c9 commit f0de40a

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/vmaware.hpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6604,6 +6604,16 @@ struct VM {
66046604
debug("FIRMWARE: C2 and C3 latencies indicate VM");
66056605
return true;
66066606
}
6607+
6608+
if (buffer_len >= 276) {
6609+
u64 hypervisor_vid = 0;
6610+
memcpy(&hypervisor_vid, buffer + 268, 8);
6611+
6612+
if (hypervisor_vid != 0) {
6613+
debug("FIRMWARE: FACP 'Hypervisor Vendor Identity' field is occupied");
6614+
return true;
6615+
}
6616+
}
66076617
}
66086618

66096619
return false;

0 commit comments

Comments
 (0)