Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: c0122840489194215a9209bb37f406f44c416953
https://github.com/tianocore/edk2/commit/c0122840489194215a9209bb37f406f44c416953
Author: Wei6 Xu <[email protected]>
Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths:
M StandaloneMmPkg/Core/Dispatcher.c
M StandaloneMmPkg/Core/FwVol.c
M StandaloneMmPkg/Core/StandaloneMmCore.c
M StandaloneMmPkg/Core/StandaloneMmCore.h
M StandaloneMmPkg/Core/StandaloneMmCore.inf
M StandaloneMmPkg/StandaloneMmPkg.dec
Log Message:
-----------
StandaloneMmPkg/Core: Limit FwVol encapsulation section recursion
MmCoreFfsFindMmDriver() is called recursively for encapsulation sections.
Currently this recursion is not limited. Introduce a new PCD
(fixed-at-build, or patchable-in-module), and make MmCoreFfsFindMmDriver()
track the section nesting depth against that PCD.
Cc: Laszlo Ersek <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Sami Mujawar <[email protected]>
Cc: Ray Ni <[email protected]>
Signed-off-by: Wei6 Xu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Commit: 0904161f6f051b9f42ffa65b1f9aa4a5b29e2119
https://github.com/tianocore/edk2/commit/0904161f6f051b9f42ffa65b1f9aa4a5b29e2119
Author: Wei6 Xu <[email protected]>
Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths:
M StandaloneMmPkg/Core/FwVol.c
Log Message:
-----------
StandaloneMmPkg/Core: Fix potential memory leak issue
In MmCoreFfsFindMmDriver(),
- ScratchBuffer is not freed in the error return path that DstBuffer page
allocation fails. Free ScratchBuffer before return with error.
- If the decoded buffer is identical to the data in InputSection,
ExtractGuidedSectionDecode() will change the value of DstBuffer rather
than changing the contents of the buffer that DstBuffer points at, in
which case freeing DstBuffer is wrong. Introduce a local variable
AllocatedDstBuffer for buffer free, free AllocatedDstBuffer immediately
if it is not used.
Cc: Laszlo Ersek <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Sami Mujawar <[email protected]>
Cc: Ray Ni <[email protected]>
Signed-off-by: Wei6 Xu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Commit: 4a9fcab124369c5568a8373a0d2fbc527867a4d9
https://github.com/tianocore/edk2/commit/4a9fcab124369c5568a8373a0d2fbc527867a4d9
Author: Wei6 Xu <[email protected]>
Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths:
M StandaloneMmPkg/Core/FwVol.c
Log Message:
-----------
StandaloneMmPkg/Core: Fix issue that offset calculation might be wrong
MmCoreFfsFindMmDriver() assumes FileHeader is EFI_FFS_FILE_HEADER.
If FileHeader is an EFI_FFS_FILE_HEADER2, 'FileHeader + 1' will get a
wrong section address. Use FfsFindSection to get the section directly,
instead of 'FileHeader + 1' to avoid this issue.
MmCoreFfsFindMmDriver() also assumes section is EFI_COMMON_SECTION_HEADER.
If Section is EFI_COMMON_SECTION_HEADER2, 'Section + 1' will get a wrong
wrong InnerFvHeader adress. Add section head detection and calculate the
address accordingly.
Cc: Laszlo Ersek <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Sami Mujawar <[email protected]>
Cc: Ray Ni <[email protected]>
Signed-off-by: Wei6 Xu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Commit: 3c66390e4a514dcce4c8cc82f489d653d55ee3fa
https://github.com/tianocore/edk2/commit/3c66390e4a514dcce4c8cc82f489d653d55ee3fa
Author: Wei6 Xu <[email protected]>
Date: 2023-12-19 (Tue, 19 Dec 2023)
Changed paths:
M StandaloneMmPkg/Core/FwVol.c
Log Message:
-----------
StandaloneMmPkg/Core: Fix the failure to find uncompressed inner FV
The MmCoreFfsFindMmDriver only checks for encapsulated compressed FVs.
When an inner FV is uncompressed, StandaloneMmCore will miss the FV and
all the MM drivers in the FV will not be dispatched.
Add checks for uncompressed inner FV to fix this issue.
Cc: Laszlo Ersek <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Sami Mujawar <[email protected]>
Cc: Ray Ni <[email protected]>
Signed-off-by: Wei6 Xu <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/74daeded0cab...3c66390e4a51
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits