Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 2970e5699ba6267f3384ffab20f96647578aebc8
      
https://github.com/tianocore/edk2/commit/2970e5699ba6267f3384ffab20f96647578aebc8
  Author: Johnny.Fan <[email protected]>
  Date:   2026-08-12 (Wed, 12 Aug 2026)

  Changed paths:
    M EmbeddedPkg/Library/AcpiLib/AcpiLib.c

  Log Message:
  -----------
  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 <[email protected]>
Signed-off-by: Johnny.Fan <[email protected]>



To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to