edk2/EmbeddedPkg
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
..
Application EmbeddedPkg: Add missing EFIAPI for event callback functions 2026-05-22 16:43:19 +00:00
Drivers EmbeddedPkg: Add missing EFIAPI for protocol member functions 2026-05-22 16:43:19 +00:00
EmbeddedMonotonicCounter EmbeddedPkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
GdbStub EmbeddedPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Include EmbeddedPkg,MdeModulePkg,DynamicTablesPkg: Move ACPI helper macros 2026-06-18 13:03:24 +00:00
Library EmbeddedPkg/AcpiLib: Fix memory corruption in AcpiAmlObjectUpdateInteger 2026-08-12 08:13:56 +00:00
MetronomeDxe EmbeddedPkg/MetronomeDxe: Update outdated lower bound comment 2022-11-29 19:39:43 +00:00
RealTimeClockRuntimeDxe Revert "ArmPlatformPkg,EmbeddedPkg,MdeModulePkg: Move RealTimeClockLib ..." 2026-05-06 03:41:31 +00:00
Scripts/LauterbachT32 EmbeddedPkg: fix mdlint issues 2026-03-04 22:02:33 +00:00
SimpleTextInOutSerial EmbeddedPkg: CodeQL Fixes. 2025-01-15 11:18:04 +00:00
Test/Mock EmbeddedPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
Universal/MmcDxe EmbeddedPkg: Replace include guards with #pragma once 2026-02-23 21:01:28 +00:00
EmbeddedPkg.ci.yaml Global: Set MarkdownLintCheck plugin to AuditOnly 2026-07-29 12:32:09 +00:00
EmbeddedPkg.dec EmbeddedPkg: Introduce GBL protocols 2026-06-12 09:38:53 +00:00
EmbeddedPkg.dsc Global: Move ArmLib to MdePkg 2026-04-17 11:42:23 +00:00