Fast forward with closed source changes on Vmbfs checks and pre-mem bump changes#80
Open
maheeraeron wants to merge 2 commits into
Open
Fast forward with closed source changes on Vmbfs checks and pre-mem bump changes#80maheeraeron wants to merge 2 commits into
maheeraeron wants to merge 2 commits into
Conversation
…responses [Copilot] Harden VmbfsDxe against malicious host responses Remove VMBFS_BAD_HOST macro (was ASSERT(FALSE), no-op in release) and replace all call sites with FAIL_FAST_UNEXPECTED_HOST_BEHAVIOR(). Remove dead code after each FAIL_FAST (status assignments, goto Cleanup, buffer clamping) since FAIL_FAST terminates the system. Hardened checks: version response size/type, file info response size/type, read payload response size/type, response byte count exceeding request, and oversized receive callback packets. ---- Security hardening: enforce fail-fast behavior and stricter validation to defend VmbfsDxe against malicious/unexpected host responses. Strengthens VmbfsDxe’s handling of incorrect/hostile VMBFS messages by replacing recoverable error paths with fail-fast crashes and tightening message buffer handling. - `MsvmPkg/VmbfsDxe/VmbfsEfi.h`: remove `VMBFS_BAD_HOST` macro and add `CrashLib` include to support fail-fast behavior. - `MsvmPkg/VmbfsDxe/Vmbfs.c`: fail fast on invalid version response messages; zero-initialize the packet buffer before use. - `MsvmPkg/VmbfsDxe/VmbfsFile.c`: replace multiple “bad host” error/cleanup paths with `FAIL_FAST_UNEXPECTED_HOST_BEHAVIOR()` for malformed responses, size mismatches, and oversize buffer lengths. - `MsvmPkg/VmbfsDxe/VmbfsDxe.inf`: add `CrashLib` dependency to wire in the new fail-fast mechanism. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #61642528
…pre-mem pages Failures in PEI may not contain enough logs, so bump the pre-mem pages in the advanced logger. Additionally, use DEBUG_INFO for mmio information. ---- #### AI description (iteration 1) #### PR Classification Bug fix to improve MMIO configuration logging and increase pre-memory logger buffer size to address ARM64 UEFI MMU configuration failures. #### PR Summary This pull request enhances debugging capabilities for MMIO configuration issues in ARM64 UEFI by promoting log levels from DEBUG_VERBOSE to DEBUG_INFO and increasing the pre-memory logger buffer size to capture more boot-time diagnostics. - `Config.c`: Added DEBUG_INFO logging for resolved MMIO PCDs (LowGap and HighGap base/size) in bytes to make host-supplied MMIO layout visible in EfiDiagnostics ETW - `Config.c`: Bumped MMIO ranges debug output from DEBUG_VERBOSE to DEBUG_INFO for better visibility - `Mmu.c`: Changed ConfigureMmu debug log level from DEBUG_VERBOSE to DEBUG_INFO - `MsvmPkgAARCH64.dsc` and `MsvmPkgX64.dsc`: Increased PcdAdvancedLoggerPreMemPages from 1 (4KB) to 8 (32KB) to accommodate additional logging <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot --> Related work items: #48431797, #62345035
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fast forwards with closed source changes on Vmbfs checks and increasing the PEI pre-mem buffer for the advanced logger