edk2/EmbeddedPkg/Library
Johnny.Fan 2970e5699b EmbeddedPkg/AcpiLib: Fix memory corruption in AcpiAmlObjectUpdateInteger
The original implementation of AcpiAmlObjectUpdateInteger had a critical
  bug when updating integer objects that were encoded with AML_ZERO_OP(0x00)
  or AML_ONE_OP(0x01), which are 1-byte optimized encodings.

  When the caller tried to update such an object to a value other than 0
  or 1, the code would:
  1. Overwrite the opcode byte with the new value's LSB
  2. This changed the opcode itself, e.g. 0x0B becomes AML_WORD_PREFIX
  3. Subsequent AML bytes (name segments of following objects) get
     misinterpreted as integer data
  4. Result: silent AML structure is silently corrupted, causing the OS to
     fail parsing ACPI tables and eventually crash.

  The fix:
  1. Only allow 0 -> 0 or 1 updates using the original 1-byte encoding
  2. For any other value, explicitly fail with a diagnostic
  3. Provide clear debug instructions on how to fix the ASL source

Reviewed-by: jie.fu <jie.fu@cixtech.com>
Signed-off-by: Johnny.Fan <Johnny.Fan@cixtech.com>
2026-08-12 08:13:56 +00:00
..
AcpiLib EmbeddedPkg/AcpiLib: Fix memory corruption in AcpiAmlObjectUpdateInteger 2026-08-12 08:13:56 +00:00
AndroidBootImgLib EmbeddedPkg/AndroidBootImgLib: Fix typo in Buffer parameter description 2026-01-23 10:46:37 +00:00
CoherentDmaLib EmbeddedPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DebugAgentTimerLibNull EmbeddedPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
DxeDtPlatformDtbLoaderLibDefault EmbeddedPkg: align Inf file headers with INF Spec standard 2026-03-02 19:32:17 +00:00
GdbSerialDebugPortLib EmbeddedPkg/GdbSerialDebugPortLib: fix compile warning 2022-09-05 13:52:51 +00:00
GdbSerialLib EmbeddedPkg: Remove duplicated words 2022-09-05 13:52:51 +00:00
NonCoherentDmaLib EmbeddedPkg: NonCoherentDmaLib: Set EFI_MEMORY_XP Capability on DMA Buffer 2024-07-29 22:42:41 +00:00
NorFlashInfoLib EmbeddedPkg: align Inf file headers with INF Spec standard 2026-03-02 19:32:17 +00:00
NvVarStoreFormattedLib EmbeddedPkg: Extend NvVarStoreFormattedLib LIBRARY_CLASS 2019-04-29 15:34:16 +02:00
PlatformHasAcpiLib EmbeddedPkg: Replace BSD License with BSD+Patent License 2019-04-09 10:57:58 -07:00
PrePiExtractGuidedSectionLib EmbeddedPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
PrePiHobLib EmbeddedPkg: Replace manual alignment checks with helper macros 2026-06-09 07:20:10 +00:00
PrePiLib EmbeddedPkg: PrePiLib: Fix uninitialized variable warnings 2026-06-24 14:49:50 +00:00
PrePiMemoryAllocationLib EmbeddedPkg: Add missing FreeAlignedPages() implementation 2026-04-21 16:55:40 +00:00
TemplateRealTimeClockLib Revert "ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib ..." 2026-05-06 03:41:31 +00:00
TimeBaseLib EmbeddedPkg/TimeBaseLib: aligning year with UEFI specification 2025-06-26 18:40:15 +00:00
VirtualRealTimeClockLib Revert "ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib ..." 2026-05-06 03:41:31 +00:00