Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102533936
D45335.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
561 B
Referenced Files
None
Subscribers
None
D45335.diff
View Options
diff --git a/usr.sbin/bhyve/amd64/pci_gvt-d.c b/usr.sbin/bhyve/amd64/pci_gvt-d.c
--- a/usr.sbin/bhyve/amd64/pci_gvt-d.c
+++ b/usr.sbin/bhyve/amd64/pci_gvt-d.c
@@ -222,6 +222,13 @@
opregion->len = header->size * KB;
munmap(header, sizeof(*header));
+ if (opregion->len != sizeof(struct igd_opregion)) {
+ warnx("%s: Invalid OpRegion size of 0x%lx", __func__,
+ opregion->len);
+ close(memfd);
+ return (-1);
+ }
+
opregion->hva = mmap(NULL, opregion->len, PROT_READ, MAP_SHARED, memfd,
opregion->hpa);
if (opregion->hva == MAP_FAILED) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 14, 5:10 PM (4 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14631446
Default Alt Text
D45335.diff (561 B)
Attached To
Mode
D45335: bhyve: verify OpRegion size
Attached
Detach File
Event Timeline
Log In to Comment