Closed sureshkumarpMSFT closed 3 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 1.35%. Comparing base (
11d1a1c
) to head (f9d9cd3
). Report is 4 commits behind head on release/202311.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Closing in favor of: https://github.com/microsoft/mu_basecore/pull/1131.
Description
There is buffer overrun in FtwGetLastWriteHeader function when the buffer examined is malformed. In this case the code is trying to access beyond FtwWorkSpaceSize in any of the code prior to (Offset >= FtwWorkSpaceSize) check
Changed the code to anticipate this early and terminate the loop earlier when offset + EFI_FAULT_TOLERANT_WRITE_HEADER is greater than FtwWorkSpaceSize
[x ] Impacts functionality?
[ x] Impacts security?
[ ] Breaking change?
[ ] Includes tests?
[ ] Includes documentation?
How This Was Tested
Tested this in platform which has a SPI chip with improper firmware blocks. Without this fix boot crashed and with this change system continued to boot.
Integration Instructions
N/A