diff options
Diffstat (limited to 'source/components')
188 files changed, 519 insertions, 212 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 529037663c18..7dac8ff29ab9 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbconvert.c b/source/components/debugger/dbconvert.c index b2159fbd04fe..526b93adea9a 100644 --- a/source/components/debugger/dbconvert.c +++ b/source/components/debugger/dbconvert.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbdisply.c b/source/components/debugger/dbdisply.c index 27b568e0f645..5585e7303b20 100644 --- a/source/components/debugger/dbdisply.c +++ b/source/components/debugger/dbdisply.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbexec.c b/source/components/debugger/dbexec.c index 7cdd12c5e34d..f130d0133583 100644 --- a/source/components/debugger/dbexec.c +++ b/source/components/debugger/dbexec.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 74603d6d11aa..15e6fd0991a3 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbhistry.c b/source/components/debugger/dbhistry.c index 887c14fd6415..2f2924f8506d 100644 --- a/source/components/debugger/dbhistry.c +++ b/source/components/debugger/dbhistry.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index 70d65db06be7..f44c7b7c9c8c 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbmethod.c b/source/components/debugger/dbmethod.c index c806e01e3553..6210f6525759 100644 --- a/source/components/debugger/dbmethod.c +++ b/source/components/debugger/dbmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index 3309a4285ec8..82baf91e67b9 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbobject.c b/source/components/debugger/dbobject.c index b3a2529c36f2..bec3a15de385 100644 --- a/source/components/debugger/dbobject.c +++ b/source/components/debugger/dbobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbstats.c b/source/components/debugger/dbstats.c index 82810e6a3289..eab2378e50cb 100644 --- a/source/components/debugger/dbstats.c +++ b/source/components/debugger/dbstats.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbtest.c b/source/components/debugger/dbtest.c index 8e9c58111150..e0033772b296 100644 --- a/source/components/debugger/dbtest.c +++ b/source/components/debugger/dbtest.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbutils.c b/source/components/debugger/dbutils.c index 9db2425d6aa8..83d15ee72b95 100644 --- a/source/components/debugger/dbutils.c +++ b/source/components/debugger/dbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/debugger/dbxface.c b/source/components/debugger/dbxface.c index 2f77edbf5530..2c221e4b7023 100644 --- a/source/components/debugger/dbxface.c +++ b/source/components/debugger/dbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index 3a9416140496..700ccbc6899b 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index 7dc9a5225549..347b3d3ccc2f 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmdeferred.c b/source/components/disassembler/dmdeferred.c index 3a30cfd689e9..8c0d9cb04c84 100644 --- a/source/components/disassembler/dmdeferred.c +++ b/source/components/disassembler/dmdeferred.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmnames.c b/source/components/disassembler/dmnames.c index f26878344b90..b3bb27a73fc1 100644 --- a/source/components/disassembler/dmnames.c +++ b/source/components/disassembler/dmnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmopcode.c b/source/components/disassembler/dmopcode.c index a8fbb269502f..e325a964d1f0 100644 --- a/source/components/disassembler/dmopcode.c +++ b/source/components/disassembler/dmopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -797,6 +797,7 @@ AcpiDmDisassembleOneOp ( UINT32 Offset; UINT32 Length; ACPI_PARSE_OBJECT *Child; + ACPI_PARSE_OBJECT *MethodCallOp; ACPI_STATUS Status; UINT8 *Aml; const AH_DEVICE_ID *IdInfo; @@ -986,6 +987,13 @@ AcpiDmDisassembleOneOp ( case AML_INT_NAMEPATH_OP: AcpiDmNamestring (Op->Common.Value.Name); + /* If this namepath is a Package element, emit a separating comma */ + if ((Op->Common.Parent) && + ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) || + (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))) + { + AcpiOsPrintf (", "); + } break; case AML_INT_NAMEDFIELD_OP: @@ -1086,10 +1094,19 @@ AcpiDmDisassembleOneOp ( case AML_INT_METHODCALL_OP: + MethodCallOp = Op; Op = AcpiPsGetDepthNext (NULL, Op); Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; AcpiDmNamestring (Op->Common.Value.Name); + + /* If the method name is a Package element, emit a separating comma */ + if ((MethodCallOp->Common.Parent) && + ((MethodCallOp->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) || + (MethodCallOp->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))) + { + AcpiOsPrintf (", "); + } break; case AML_WHILE_OP: diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 1e37f8f3b6a6..ebec29442b8a 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -536,10 +536,31 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } + /* + * Check if this op was allocated from the extended parse object cache. + * Only extended ops (NAMED_OBJECT, DEFERRED, BYTELIST) have the + * Named.Data and Named.Length fields. Generic ops would overflow. + */ + if (NextOp->Common.Flags == ACPI_PARSEOP_GENERIC) + { + return (AE_TYPE); + } + Aml = NextOp->Named.Data; BufferLength = NextOp->Common.Value.Size; /* + * Validate BufferLength against Named.Length to prevent reading + * beyond the actual data. Named.Length is computed during parsing + * and represents the actual byte count, while Value.Size comes + * from the AML and can be manipulated by malformed AML. + */ + if (BufferLength > NextOp->Named.Length) + { + return (AE_TYPE); + } + + /* * Any buffer smaller than one byte cannot possibly be a resource * template. Two bytes could possibly be a "NULL" resource template * with a lone end tag descriptor (as generated via diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c index c8c77c611f97..96faf1966859 100644 --- a/source/components/disassembler/dmresrcl.c +++ b/source/components/disassembler/dmresrcl.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrcl2.c b/source/components/disassembler/dmresrcl2.c index ecd049fc0c77..946bb1f887f8 100644 --- a/source/components/disassembler/dmresrcl2.c +++ b/source/components/disassembler/dmresrcl2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c index acfbdb76612c..72a2b7d3aa95 100644 --- a/source/components/disassembler/dmresrcs.c +++ b/source/components/disassembler/dmresrcs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmutils.c b/source/components/disassembler/dmutils.c index 987d456522cd..3dd095df8b40 100644 --- a/source/components/disassembler/dmutils.c +++ b/source/components/disassembler/dmutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/disassembler/dmwalk.c b/source/components/disassembler/dmwalk.c index b738417b05cc..b57b6a5409ed 100644 --- a/source/components/disassembler/dmwalk.c +++ b/source/components/disassembler/dmwalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -305,13 +305,6 @@ AcpiDmWalkParseTree ( } } - /* Terminate walk at start op */ - - if (Op == StartOp) - { - break; - } - /* No more children, re-visit this node */ if (!NodePreviouslyVisited) @@ -320,6 +313,13 @@ AcpiDmWalkParseTree ( continue; } + /* Terminate walk at start op */ + + if (Op == StartOp) + { + break; + } + /* No more children, visit peers */ if (Op->Common.Next) diff --git a/source/components/dispatcher/dsargs.c b/source/components/dispatcher/dsargs.c index 7fe605f1d180..04b0a66849f0 100644 --- a/source/components/dispatcher/dsargs.c +++ b/source/components/dispatcher/dsargs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dscontrol.c b/source/components/dispatcher/dscontrol.c index 3eaa6f3f8262..3cf2d0443942 100644 --- a/source/components/dispatcher/dscontrol.c +++ b/source/components/dispatcher/dscontrol.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsdebug.c b/source/components/dispatcher/dsdebug.c index 2bc7dc004f5c..89ad50015384 100644 --- a/source/components/dispatcher/dsdebug.c +++ b/source/components/dispatcher/dsdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsfield.c b/source/components/dispatcher/dsfield.c index 15e35fd76f38..6d6deed9966f 100644 --- a/source/components/dispatcher/dsfield.c +++ b/source/components/dispatcher/dsfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c index 758233ec999c..aeca4eae94ad 100644 --- a/source/components/dispatcher/dsinit.c +++ b/source/components/dispatcher/dsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 09745e120bc2..fc8917b324c0 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -901,6 +901,8 @@ AcpiDsTerminateControlMethod ( ACPI_OPERAND_OBJECT *MethodDesc, ACPI_WALK_STATE *WalkState) { + UINT32 i; + ACPI_NAMESPACE_NODE *RefNode; ACPI_FUNCTION_TRACE_PTR (DsTerminateControlMethod, WalkState); @@ -914,6 +916,45 @@ AcpiDsTerminateControlMethod ( if (WalkState) { + /* + * Check if the return value is a RefOf reference to a method local + * or argument. If so, clear the reference to avoid use-after-free + * when the walk state is deleted. + */ + if (WalkState->ReturnDesc && + (WalkState->ReturnDesc->Common.Type == ACPI_TYPE_LOCAL_REFERENCE) && + (WalkState->ReturnDesc->Reference.Class == ACPI_REFCLASS_REFOF)) + { + RefNode = WalkState->ReturnDesc->Reference.Object; + if (RefNode) + { + /* Check against method locals */ + for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) + { + if (RefNode == &WalkState->LocalVariables[i]) + { + AcpiUtRemoveReference (WalkState->ReturnDesc); + WalkState->ReturnDesc = NULL; + break; + } + } + + /* Check against method arguments if not already cleared */ + if (WalkState->ReturnDesc) + { + for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) + { + if (RefNode == &WalkState->Arguments[i]) + { + AcpiUtRemoveReference (WalkState->ReturnDesc); + WalkState->ReturnDesc = NULL; + break; + } + } + } + } + } + /* Delete all arguments and locals */ AcpiDsMethodDataDeleteAll (WalkState); diff --git a/source/components/dispatcher/dsmthdat.c b/source/components/dispatcher/dsmthdat.c index 98e69efa1f05..6a9552df9e5f 100644 --- a/source/components/dispatcher/dsmthdat.c +++ b/source/components/dispatcher/dsmthdat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsobject.c b/source/components/dispatcher/dsobject.c index 08d93ecd406b..2b8e75253e04 100644 --- a/source/components/dispatcher/dsobject.c +++ b/source/components/dispatcher/dsobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index baba6805b363..88614790395d 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dspkginit.c b/source/components/dispatcher/dspkginit.c index 22f4a99ba276..5f1e8b0597a6 100644 --- a/source/components/dispatcher/dspkginit.c +++ b/source/components/dispatcher/dspkginit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dsutils.c b/source/components/dispatcher/dsutils.c index d2d16c4865f0..0919636cf2d6 100644 --- a/source/components/dispatcher/dsutils.c +++ b/source/components/dispatcher/dsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswexec.c b/source/components/dispatcher/dswexec.c index bb1558ea312c..4b852fa233be 100644 --- a/source/components/dispatcher/dswexec.c +++ b/source/components/dispatcher/dswexec.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswload.c b/source/components/dispatcher/dswload.c index b4b7e512dbea..4c27b9a91431 100644 --- a/source/components/dispatcher/dswload.c +++ b/source/components/dispatcher/dswload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index 4ad4014a2811..b53850c0890c 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswscope.c b/source/components/dispatcher/dswscope.c index 58cc75509897..ce48ddc5ce81 100644 --- a/source/components/dispatcher/dswscope.c +++ b/source/components/dispatcher/dswscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/dispatcher/dswstate.c b/source/components/dispatcher/dswstate.c index a5a63d01b1a7..01d4a29c6c7d 100644 --- a/source/components/dispatcher/dswstate.c +++ b/source/components/dispatcher/dswstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evevent.c b/source/components/events/evevent.c index b2dd444a38a6..ba296d32dc52 100644 --- a/source/components/events/evevent.c +++ b/source/components/events/evevent.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evglock.c b/source/components/events/evglock.c index 153a7ff0a21f..52ce050760e0 100644 --- a/source/components/events/evglock.c +++ b/source/components/events/evglock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpe.c b/source/components/events/evgpe.c index 01e628a29589..c5b4a4863306 100644 --- a/source/components/events/evgpe.c +++ b/source/components/events/evgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeblk.c b/source/components/events/evgpeblk.c index 899e19b13990..234df2a9cce8 100644 --- a/source/components/events/evgpeblk.c +++ b/source/components/events/evgpeblk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeinit.c b/source/components/events/evgpeinit.c index 5321950d51fa..5bea15f71c18 100644 --- a/source/components/events/evgpeinit.c +++ b/source/components/events/evgpeinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evgpeutil.c b/source/components/events/evgpeutil.c index 32e7c0fa3274..de12a826f2e1 100644 --- a/source/components/events/evgpeutil.c +++ b/source/components/events/evgpeutil.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evhandler.c b/source/components/events/evhandler.c index efc466462f85..bc04cf6fc217 100644 --- a/source/components/events/evhandler.c +++ b/source/components/events/evhandler.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -290,6 +290,13 @@ AcpiEvHasDefaultHandler ( while (HandlerObj) { + /* Validate handler object type before accessing fields */ + + if (HandlerObj->Common.Type != ACPI_TYPE_LOCAL_ADDRESS_HANDLER) + { + break; + } + if (HandlerObj->AddressSpace.SpaceId == SpaceId) { if (HandlerObj->AddressSpace.HandlerFlags & @@ -460,6 +467,11 @@ AcpiEvFindRegionHandler ( while (HandlerObj) { + if (HandlerObj->Common.Type != ACPI_TYPE_LOCAL_ADDRESS_HANDLER) + { + break; + } + /* Same SpaceId indicates a handler is installed */ if (HandlerObj->AddressSpace.SpaceId == SpaceId) diff --git a/source/components/events/evmisc.c b/source/components/events/evmisc.c index d2e751d0192b..31ee8f24e602 100644 --- a/source/components/events/evmisc.c +++ b/source/components/events/evmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c index 757983b35b76..1fe34495a43a 100644 --- a/source/components/events/evregion.c +++ b/source/components/events/evregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c index d8d09cdd0dc4..2d9c2932377b 100644 --- a/source/components/events/evrgnini.c +++ b/source/components/events/evrgnini.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evsci.c b/source/components/events/evsci.c index 1c8352f5cf77..709c81776062 100644 --- a/source/components/events/evsci.c +++ b/source/components/events/evsci.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxface.c b/source/components/events/evxface.c index 2d334fd455fb..233b205edb46 100644 --- a/source/components/events/evxface.c +++ b/source/components/events/evxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfevnt.c b/source/components/events/evxfevnt.c index 9e7972eae8f6..84158bb084cd 100644 --- a/source/components/events/evxfevnt.c +++ b/source/components/events/evxfevnt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfgpe.c b/source/components/events/evxfgpe.c index bda4e6e93bf4..642f35d3213a 100644 --- a/source/components/events/evxfgpe.c +++ b/source/components/events/evxfgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/events/evxfregn.c b/source/components/events/evxfregn.c index 04c880183aaf..3b3027531a77 100644 --- a/source/components/events/evxfregn.c +++ b/source/components/events/evxfregn.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exconcat.c b/source/components/executer/exconcat.c index 3010d9d4d0b7..93f114b8cd03 100644 --- a/source/components/executer/exconcat.c +++ b/source/components/executer/exconcat.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c index 2edf1577ffd5..f9fec826db25 100644 --- a/source/components/executer/exconfig.c +++ b/source/components/executer/exconfig.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -247,6 +247,8 @@ AcpiExLoadTableOp ( ACPI_OPERAND_OBJECT *ReturnObj; ACPI_OPERAND_OBJECT *DdbHandle; UINT32 TableIndex; + char OemId[ACPI_OEM_ID_SIZE + 1]; + char OemTableId[ACPI_OEM_TABLE_ID_SIZE + 1]; ACPI_FUNCTION_TRACE (ExLoadTableOp); @@ -262,13 +264,34 @@ AcpiExLoadTableOp ( *ReturnDesc = ReturnObj; + /* + * Validate OEM ID and OEM Table ID string lengths. + * AcpiTbFindTable expects strings that can safely read + * ACPI_OEM_ID_SIZE and ACPI_OEM_TABLE_ID_SIZE bytes. + */ + if ((Operand[1]->String.Length > ACPI_OEM_ID_SIZE) || + (Operand[2]->String.Length > ACPI_OEM_TABLE_ID_SIZE)) + { + return_ACPI_STATUS (AE_AML_STRING_LIMIT); + } + + /* + * Copy OEM strings to local buffers with guaranteed null-termination. + * This prevents heap-buffer-overflow when AcpiTbFindTable reads + * ACPI_OEM_ID_SIZE/ACPI_OEM_TABLE_ID_SIZE bytes. + */ + memcpy (OemId, Operand[1]->String.Pointer, Operand[1]->String.Length); + OemId[Operand[1]->String.Length] = 0; + memcpy (OemTableId, Operand[2]->String.Pointer, Operand[2]->String.Length); + OemTableId[Operand[2]->String.Length] = 0; + /* Find the ACPI table in the RSDT/XSDT */ AcpiExExitInterpreter (); Status = AcpiTbFindTable ( Operand[0]->String.Pointer, - Operand[1]->String.Pointer, - Operand[2]->String.Pointer, &TableIndex); + OemId, + OemTableId, &TableIndex); AcpiExEnterInterpreter (); if (ACPI_FAILURE (Status)) { diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index 31666876daf3..a2890f21a825 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/excreate.c b/source/components/executer/excreate.c index de0bf9e3625f..f78c7e53f69b 100644 --- a/source/components/executer/excreate.c +++ b/source/components/executer/excreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exdebug.c b/source/components/executer/exdebug.c index 17e14d8098fb..7660f6a8e85b 100644 --- a/source/components/executer/exdebug.c +++ b/source/components/executer/exdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exdump.c b/source/components/executer/exdump.c index a6d1e420eb51..a3c8e76ca83d 100644 --- a/source/components/executer/exdump.c +++ b/source/components/executer/exdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exfield.c b/source/components/executer/exfield.c index 4f4e7043ad65..ac968acf5eda 100644 --- a/source/components/executer/exfield.c +++ b/source/components/executer/exfield.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exfldio.c b/source/components/executer/exfldio.c index b81235c2451e..a1e955a9edd1 100644 --- a/source/components/executer/exfldio.c +++ b/source/components/executer/exfldio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c index b24720c61230..befd8a998e80 100644 --- a/source/components/executer/exmisc.c +++ b/source/components/executer/exmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exmutex.c b/source/components/executer/exmutex.c index ba0ffe66fcf1..6f454ad48030 100644 --- a/source/components/executer/exmutex.c +++ b/source/components/executer/exmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exnames.c b/source/components/executer/exnames.c index 46996ba50c32..4dcf6c07c2fc 100644 --- a/source/components/executer/exnames.c +++ b/source/components/executer/exnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg1.c b/source/components/executer/exoparg1.c index 339c4d3c8ccf..95182a3f00eb 100644 --- a/source/components/executer/exoparg1.c +++ b/source/components/executer/exoparg1.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg2.c b/source/components/executer/exoparg2.c index 83b2d480bca2..2501994e3b9b 100644 --- a/source/components/executer/exoparg2.c +++ b/source/components/executer/exoparg2.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exoparg3.c b/source/components/executer/exoparg3.c index 722bbec46521..e42317ab3039 100644 --- a/source/components/executer/exoparg3.c +++ b/source/components/executer/exoparg3.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -225,11 +225,18 @@ AcpiExOpcode_3A_0T_0R ( AcpiOsSignal (ACPI_SIGNAL_FATAL, &Fatal); +#ifndef ACPI_CONTINUE_ON_FATAL /* * Might return while OS is shutting down, so abort the AML execution * by returning an error. */ return_ACPI_STATUS (AE_ERROR); +#else + /* + * The alstests require that the Fatal() opcode does not return an error. + */ + return_ACPI_STATUS (AE_OK); +#endif case AML_EXTERNAL_OP: /* @@ -313,7 +320,8 @@ AcpiExOpcode_3A_1T_1R ( /* Truncate request if larger than the actual String/Buffer */ - else if ((Index + Length) > Operand[0]->String.Length) + else if ((Index + Length) > Operand[0]->String.Length || + (Index + Length) < Index) /* Check for overflow */ { Length = (ACPI_SIZE) Operand[0]->String.Length - (ACPI_SIZE) Index; diff --git a/source/components/executer/exoparg6.c b/source/components/executer/exoparg6.c index 00ca4f727540..85c1e2db839e 100644 --- a/source/components/executer/exoparg6.c +++ b/source/components/executer/exoparg6.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exprep.c b/source/components/executer/exprep.c index c022231dea1d..0673adbd9ef6 100644 --- a/source/components/executer/exprep.c +++ b/source/components/executer/exprep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exregion.c b/source/components/executer/exregion.c index 32cec4d38ebe..0a9d89638ac0 100644 --- a/source/components/executer/exregion.c +++ b/source/components/executer/exregion.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresnte.c b/source/components/executer/exresnte.c index 319d81eee522..1bfe167aa65b 100644 --- a/source/components/executer/exresnte.c +++ b/source/components/executer/exresnte.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresolv.c b/source/components/executer/exresolv.c index 6dc658cff8c1..4481ba54c605 100644 --- a/source/components/executer/exresolv.c +++ b/source/components/executer/exresolv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index 2bc79bea248d..eaa669f5f4f6 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exserial.c b/source/components/executer/exserial.c index f5740276766f..0a40abc2ced8 100644 --- a/source/components/executer/exserial.c +++ b/source/components/executer/exserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstore.c b/source/components/executer/exstore.c index f39769119fcd..a0d8fe5b794e 100644 --- a/source/components/executer/exstore.c +++ b/source/components/executer/exstore.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstoren.c b/source/components/executer/exstoren.c index 71d0ad10dfdc..26f5a78870fe 100644 --- a/source/components/executer/exstoren.c +++ b/source/components/executer/exstoren.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exstorob.c b/source/components/executer/exstorob.c index 026ab5bd2bc8..74137617d7a4 100644 --- a/source/components/executer/exstorob.c +++ b/source/components/executer/exstorob.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exsystem.c b/source/components/executer/exsystem.c index 1f42625a60fa..c21cfe1e26fd 100644 --- a/source/components/executer/exsystem.c +++ b/source/components/executer/exsystem.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/extrace.c b/source/components/executer/extrace.c index 2d596f2b57e4..86b06261df60 100644 --- a/source/components/executer/extrace.c +++ b/source/components/executer/extrace.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/executer/exutils.c b/source/components/executer/exutils.c index f7472a299e1f..cc38a66e0bbd 100644 --- a/source/components/executer/exutils.c +++ b/source/components/executer/exutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwacpi.c b/source/components/hardware/hwacpi.c index 21081dc4a37f..4b9c04e769ab 100644 --- a/source/components/hardware/hwacpi.c +++ b/source/components/hardware/hwacpi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwesleep.c b/source/components/hardware/hwesleep.c index c6ed4246eb61..da0384aed826 100644 --- a/source/components/hardware/hwesleep.c +++ b/source/components/hardware/hwesleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwgpe.c b/source/components/hardware/hwgpe.c index bb4ebc0225ec..1209965a1f7c 100644 --- a/source/components/hardware/hwgpe.c +++ b/source/components/hardware/hwgpe.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwpci.c b/source/components/hardware/hwpci.c index 32fb6af53fb3..122b8784cb63 100644 --- a/source/components/hardware/hwpci.c +++ b/source/components/hardware/hwpci.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwregs.c b/source/components/hardware/hwregs.c index de375d9972e3..0bee958057bd 100644 --- a/source/components/hardware/hwregs.c +++ b/source/components/hardware/hwregs.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwsleep.c b/source/components/hardware/hwsleep.c index bb38234ec7f7..83b31db44892 100644 --- a/source/components/hardware/hwsleep.c +++ b/source/components/hardware/hwsleep.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwtimer.c b/source/components/hardware/hwtimer.c index 68cf627093c6..20a9774a6389 100644 --- a/source/components/hardware/hwtimer.c +++ b/source/components/hardware/hwtimer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwvalid.c b/source/components/hardware/hwvalid.c index 0dfe4d2577ad..34f55dba257c 100644 --- a/source/components/hardware/hwvalid.c +++ b/source/components/hardware/hwvalid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwxface.c b/source/components/hardware/hwxface.c index 5075fdcff9f0..7766397a3a83 100644 --- a/source/components/hardware/hwxface.c +++ b/source/components/hardware/hwxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/hardware/hwxfsleep.c b/source/components/hardware/hwxfsleep.c index eefc239bcb92..70929451a1d2 100644 --- a/source/components/hardware/hwxfsleep.c +++ b/source/components/hardware/hwxfsleep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsaccess.c b/source/components/namespace/nsaccess.c index 5f044e198543..077aa93751a0 100644 --- a/source/components/namespace/nsaccess.c +++ b/source/components/namespace/nsaccess.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsalloc.c b/source/components/namespace/nsalloc.c index d4ff32d59654..8098277691b6 100644 --- a/source/components/namespace/nsalloc.c +++ b/source/components/namespace/nsalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsarguments.c b/source/components/namespace/nsarguments.c index 6676abe07293..513fc1148c67 100644 --- a/source/components/namespace/nsarguments.c +++ b/source/components/namespace/nsarguments.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsconvert.c b/source/components/namespace/nsconvert.c index ae039a10264d..d5da6f015bc8 100644 --- a/source/components/namespace/nsconvert.c +++ b/source/components/namespace/nsconvert.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsdump.c b/source/components/namespace/nsdump.c index e3db14a11e17..c44c9ccfde7d 100644 --- a/source/components/namespace/nsdump.c +++ b/source/components/namespace/nsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c index 86471b854af1..a3d75f44a3ee 100644 --- a/source/components/namespace/nsdumpdv.c +++ b/source/components/namespace/nsdumpdv.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index 98353ea6c671..a46c6b92f556 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsinit.c b/source/components/namespace/nsinit.c index 50a2290ac3d8..9dd898e56fd4 100644 --- a/source/components/namespace/nsinit.c +++ b/source/components/namespace/nsinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index 5e90b3b6ed9d..e733b5ed7038 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index 64a9109cf5d4..982ea66846cd 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -400,6 +400,13 @@ AcpiNsBuildNormalizedPath ( goto BuildTrailingNull; } + /* Validate the Node to avoid use-after-free vulnerabilities */ + + if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED) + { + goto BuildTrailingNull; + } + NextNode = Node; while (NextNode && NextNode != AcpiGbl_RootNode) { diff --git a/source/components/namespace/nsobject.c b/source/components/namespace/nsobject.c index aec3991bd388..f08e53214005 100644 --- a/source/components/namespace/nsobject.c +++ b/source/components/namespace/nsobject.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -336,6 +336,13 @@ AcpiNsDetachObject ( ObjDesc = Node->Object; + /* Alias nodes point directly to other namespace nodes; skip teardown */ + if (Node->Flags & ANOBJ_IS_ALIAS) + { + Node->Object = NULL; + return_VOID; + } + if (!ObjDesc || (ObjDesc->Common.Type == ACPI_TYPE_LOCAL_DATA)) { diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c index 32c7d3088902..f5246446c857 100644 --- a/source/components/namespace/nsparse.c +++ b/source/components/namespace/nsparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nspredef.c b/source/components/namespace/nspredef.c index 7a0e5005e3c8..19e904796bea 100644 --- a/source/components/namespace/nspredef.c +++ b/source/components/namespace/nspredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsprepkg.c b/source/components/namespace/nsprepkg.c index e26269aaed25..f5eafc2a2cf2 100644 --- a/source/components/namespace/nsprepkg.c +++ b/source/components/namespace/nsprepkg.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -779,6 +779,13 @@ AcpiNsCustomPackage ( /* Get version number, must be Integer */ + if (!(*Elements)) + { + ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags, + "Return Package has a NULL version element")); + return_ACPI_STATUS (AE_AML_OPERAND_TYPE); + } + if ((*Elements)->Common.Type != ACPI_TYPE_INTEGER) { ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags, diff --git a/source/components/namespace/nsrepair.c b/source/components/namespace/nsrepair.c index 21f0c9205758..3a612bc16da3 100644 --- a/source/components/namespace/nsrepair.c +++ b/source/components/namespace/nsrepair.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsrepair2.c b/source/components/namespace/nsrepair2.c index 0b43412b4e76..be5127c96cf1 100644 --- a/source/components/namespace/nsrepair2.c +++ b/source/components/namespace/nsrepair2.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nssearch.c b/source/components/namespace/nssearch.c index df61f280ea01..cf6cceb35303 100644 --- a/source/components/namespace/nssearch.c +++ b/source/components/namespace/nssearch.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsutils.c b/source/components/namespace/nsutils.c index 5f9faa8e3728..312c62d153ac 100644 --- a/source/components/namespace/nsutils.c +++ b/source/components/namespace/nsutils.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nswalk.c b/source/components/namespace/nswalk.c index ca5f39475ef9..f03d332cd598 100644 --- a/source/components/namespace/nswalk.c +++ b/source/components/namespace/nswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfeval.c b/source/components/namespace/nsxfeval.c index 244817c5818a..182f3aaa80f8 100644 --- a/source/components/namespace/nsxfeval.c +++ b/source/components/namespace/nsxfeval.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index 939ad04d514e..49dc017a7261 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/namespace/nsxfobj.c b/source/components/namespace/nsxfobj.c index aa906f9ecba0..9191d94df7c6 100644 --- a/source/components/namespace/nsxfobj.c +++ b/source/components/namespace/nsxfobj.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c index 36afbd73bad4..e9dadf4a40ad 100644 --- a/source/components/parser/psargs.c +++ b/source/components/parser/psargs.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -197,6 +197,7 @@ AcpiPsGetNextPackageLength ( UINT32 PackageLength = 0; UINT32 ByteCount; UINT8 ByteZeroMask = 0x3F; /* Default [0:5] */ + UINT32 Remaining; ACPI_FUNCTION_TRACE (PsGetNextPackageLength); @@ -206,7 +207,24 @@ AcpiPsGetNextPackageLength ( * Byte 0 bits [6:7] contain the number of additional bytes * used to encode the package length, either 0,1,2, or 3 */ + + /* Check if we have at least one byte to read */ + Remaining = (UINT32) ACPI_PTR_DIFF (ParserState->AmlEnd, Aml); + if (Remaining == 0) + { + return_UINT32 (0); + } + ByteCount = (Aml[0] >> 6); + + /* Validate ByteCount and ensure we have enough bytes to read */ + if (ByteCount >= Remaining) + { + /* Clamp to available bytes and advance to end */ + ParserState->Aml = ParserState->AmlEnd; + return_UINT32 (0); + } + ParserState->Aml += ((ACPI_SIZE) ByteCount + 1); /* Get bytes 3, 2, 1 as needed */ @@ -545,6 +563,8 @@ AcpiPsGetNextSimpleArg ( UINT32 Length; UINT16 Opcode; UINT8 *Aml = ParserState->Aml; + UINT32 Remaining = (UINT32) ACPI_PTR_DIFF (ParserState->AmlEnd, Aml); + UINT64 PartialValue; ACPI_FUNCTION_TRACE_U32 (PsGetNextSimpleArg, ArgType); @@ -557,8 +577,16 @@ AcpiPsGetNextSimpleArg ( /* Get 1 byte from the AML stream */ Opcode = AML_BYTE_OP; - Arg->Common.Value.Integer = (UINT64) *Aml; - Length = 1; + if (Remaining >= 1) + { + Arg->Common.Value.Integer = (UINT64) *Aml; + Length = 1; + } + else + { + Arg->Common.Value.Integer = 0; + Length = 0; + } break; case ARGP_WORDDATA: @@ -566,8 +594,23 @@ AcpiPsGetNextSimpleArg ( /* Get 2 bytes from the AML stream */ Opcode = AML_WORD_OP; - ACPI_MOVE_16_TO_64 (&Arg->Common.Value.Integer, Aml); - Length = 2; + if (Remaining >= 2) + { + ACPI_MOVE_16_TO_64 (&Arg->Common.Value.Integer, Aml); + Length = 2; + } + else + { + Arg->Common.Value.Integer = 0; + Length = 0; + if (Remaining > 0) + { + PartialValue = 0; + memcpy (&PartialValue, Aml, Remaining); + Arg->Common.Value.Integer = PartialValue; + Length = Remaining; + } + } break; case ARGP_DWORDDATA: @@ -575,8 +618,23 @@ AcpiPsGetNextSimpleArg ( /* Get 4 bytes from the AML stream */ Opcode = AML_DWORD_OP; - ACPI_MOVE_32_TO_64 (&Arg->Common.Value.Integer, Aml); - Length = 4; + if (Remaining >= 4) + { + ACPI_MOVE_32_TO_64 (&Arg->Common.Value.Integer, Aml); + Length = 4; + } + else + { + Arg->Common.Value.Integer = 0; + Length = 0; + if (Remaining > 0) + { + PartialValue = 0; + memcpy (&PartialValue, Aml, Remaining); + Arg->Common.Value.Integer = PartialValue; + Length = Remaining; + } + } break; case ARGP_QWORDDATA: @@ -584,8 +642,23 @@ AcpiPsGetNextSimpleArg ( /* Get 8 bytes from the AML stream */ Opcode = AML_QWORD_OP; - ACPI_MOVE_64_TO_64 (&Arg->Common.Value.Integer, Aml); - Length = 8; + if (Remaining >= 8) + { + ACPI_MOVE_64_TO_64 (&Arg->Common.Value.Integer, Aml); + Length = 8; + } + else + { + Arg->Common.Value.Integer = 0; + Length = 0; + if (Remaining > 0) + { + PartialValue = 0; + memcpy (&PartialValue, Aml, Remaining); + Arg->Common.Value.Integer = PartialValue; + Length = Remaining; + } + } break; case ARGP_CHARLIST: @@ -598,11 +671,32 @@ AcpiPsGetNextSimpleArg ( /* Find the null terminator */ Length = 0; - while (Aml[Length]) + while ((Length < Remaining) && Aml[Length]) + { + Length++; + } + if (Length < Remaining) { + /* Account for the terminating null */ Length++; } - Length++; + else + { + /* + * No terminator found - add null at buffer boundary + * and report a warning + */ + ACPI_WARNING ((AE_INFO, + "Invalid AML string: no null terminator, truncating at offset %u", + (UINT32) (Aml - ParserState->Aml))); + + /* Add null terminator at the boundary */ + if (Remaining > 0) + { + Aml[Remaining - 1] = 0; + Length = Remaining; + } + } break; case ARGP_NAME: @@ -659,6 +753,11 @@ AcpiPsGetNextField ( ASL_CV_CAPTURE_COMMENTS_ONLY (ParserState); Aml = ParserState->Aml; + if (Aml >= ParserState->AmlEnd) + { + return_PTR (NULL); + } + /* Determine field type */ switch (ACPI_GET8 (ParserState->Aml)) @@ -710,6 +809,11 @@ AcpiPsGetNextField ( /* Get the 4-character name */ + if ((ParserState->Aml + ACPI_NAMESEG_SIZE) > ParserState->AmlEnd) + { + AcpiPsFreeOp (Field); + return_PTR (NULL); + } ACPI_MOVE_32_TO_32 (&Name, ParserState->Aml); AcpiPsSetName (Field, Name); ParserState->Aml += ACPI_NAMESEG_SIZE; @@ -756,6 +860,11 @@ AcpiPsGetNextField ( /* Get the two bytes (Type/Attribute) */ + if ((ParserState->Aml + 2) > ParserState->AmlEnd) + { + AcpiPsFreeOp (Field); + return_PTR (NULL); + } AccessType = ACPI_GET8 (ParserState->Aml); ParserState->Aml++; AccessAttribute = ACPI_GET8 (ParserState->Aml); @@ -768,6 +877,11 @@ AcpiPsGetNextField ( if (Opcode == AML_INT_EXTACCESSFIELD_OP) { + if (ParserState->Aml >= ParserState->AmlEnd) + { + AcpiPsFreeOp (Field); + return_PTR (NULL); + } AccessLength = ACPI_GET8 (ParserState->Aml); ParserState->Aml++; diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c index d46eb6aff46a..58719d974408 100644 --- a/source/components/parser/psloop.c +++ b/source/components/parser/psloop.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -566,7 +566,8 @@ AcpiPsParseLoop ( WalkState->Aml = ParserState->Aml; ACPI_ERROR ((AE_INFO, "Skipping While/If block")); - if (*WalkState->Aml == AML_ELSE_OP) + if ((WalkState->Aml < ParserState->AmlEnd) && + (*WalkState->Aml == AML_ELSE_OP)) { ACPI_ERROR ((AE_INFO, "Skipping Else block")); WalkState->ParserState.Aml = WalkState->Aml + 1; diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index 146a487995ce..aa1ea040456e 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psopcode.c b/source/components/parser/psopcode.c index 9da094f1eafd..ef373a19d11d 100644 --- a/source/components/parser/psopcode.c +++ b/source/components/parser/psopcode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psopinfo.c b/source/components/parser/psopinfo.c index dcc426ff1c7b..45bf1b07cd86 100644 --- a/source/components/parser/psopinfo.c +++ b/source/components/parser/psopinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psparse.c b/source/components/parser/psparse.c index 5b6ddc7d0f84..6d4f62473335 100644 --- a/source/components/parser/psparse.c +++ b/source/components/parser/psparse.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psscope.c b/source/components/parser/psscope.c index 5a10f8c9b84c..e30a906cc2ef 100644 --- a/source/components/parser/psscope.c +++ b/source/components/parser/psscope.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/pstree.c b/source/components/parser/pstree.c index 71485e77fbaf..e05a5d661b89 100644 --- a/source/components/parser/pstree.c +++ b/source/components/parser/pstree.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/psutils.c b/source/components/parser/psutils.c index b040ef0ccd89..616b3cb9eb43 100644 --- a/source/components/parser/psutils.c +++ b/source/components/parser/psutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/parser/pswalk.c b/source/components/parser/pswalk.c index 093da84e6c83..06d8435c53c5 100644 --- a/source/components/parser/pswalk.c +++ b/source/components/parser/pswalk.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -198,7 +198,7 @@ AcpiPsDeleteParseTree ( { /* This debug option will print the entire parse tree */ - AcpiOsPrintf (" %*.s%s %p", (Level * 4), " ", + AcpiOsPrintf (" %*s%s %p", (Level * 4), "", AcpiPsGetOpcodeName (Op->Common.AmlOpcode), Op); if (Op->Named.AmlOpcode == AML_INT_NAMEPATH_OP) diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c index 818be3a850c6..ec0fa756fa50 100644 --- a/source/components/parser/psxface.c +++ b/source/components/parser/psxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsaddr.c b/source/components/resources/rsaddr.c index 8c3eb456f687..e3c06a851b40 100644 --- a/source/components/resources/rsaddr.c +++ b/source/components/resources/rsaddr.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rscalc.c b/source/components/resources/rscalc.c index 581803865206..b7e73fea0478 100644 --- a/source/components/resources/rscalc.c +++ b/source/components/resources/rscalc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rscreate.c b/source/components/resources/rscreate.c index ac2bf12dbb72..01f188bcb270 100644 --- a/source/components/resources/rscreate.c +++ b/source/components/resources/rscreate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsdump.c b/source/components/resources/rsdump.c index 56933b94093f..6bd78e9c94c9 100644 --- a/source/components/resources/rsdump.c +++ b/source/components/resources/rsdump.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsdumpinfo.c b/source/components/resources/rsdumpinfo.c index 9528d4c9fe93..b370cf71b88a 100644 --- a/source/components/resources/rsdumpinfo.c +++ b/source/components/resources/rsdumpinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsinfo.c b/source/components/resources/rsinfo.c index f8d51c01fc16..a269975b52e6 100644 --- a/source/components/resources/rsinfo.c +++ b/source/components/resources/rsinfo.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsio.c b/source/components/resources/rsio.c index cfb078e79415..7cd3eefef719 100644 --- a/source/components/resources/rsio.c +++ b/source/components/resources/rsio.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsirq.c b/source/components/resources/rsirq.c index ddf964717350..74f62c6130f4 100644 --- a/source/components/resources/rsirq.c +++ b/source/components/resources/rsirq.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rslist.c b/source/components/resources/rslist.c index 779f9626ea54..0462dec81d6f 100644 --- a/source/components/resources/rslist.c +++ b/source/components/resources/rslist.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsmemory.c b/source/components/resources/rsmemory.c index d44dffacb23e..1e9d9d84567a 100644 --- a/source/components/resources/rsmemory.c +++ b/source/components/resources/rsmemory.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsmisc.c b/source/components/resources/rsmisc.c index fa256ed4942b..665559f780e2 100644 --- a/source/components/resources/rsmisc.c +++ b/source/components/resources/rsmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsserial.c b/source/components/resources/rsserial.c index add26305ee46..87c9bed93e1e 100644 --- a/source/components/resources/rsserial.c +++ b/source/components/resources/rsserial.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -447,7 +447,7 @@ ACPI_RSCONVERT_INFO AcpiRsConvertCsi2SerialBus[14] = * ******************************************************************************/ -ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[17] = +ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[18] = { {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS, ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS), @@ -515,6 +515,11 @@ ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[17] = AML_OFFSET (I2cSerialBus.TypeSpecificFlags), 0}, + /* Read LVR from Type Specific Flags, bits[15:8] */ + {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.I2cSerialBus.Lvr), + AML_OFFSET (I2cSerialBus.TypeSpecificFlags) + 1, + 1}, + {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed), AML_OFFSET (I2cSerialBus.ConnectionSpeed), 1}, diff --git a/source/components/resources/rsutils.c b/source/components/resources/rsutils.c index 0faac38e913d..56ebdd2afe36 100644 --- a/source/components/resources/rsutils.c +++ b/source/components/resources/rsutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/resources/rsxface.c b/source/components/resources/rsxface.c index ad9783b7fb81..ef384ce21353 100644 --- a/source/components/resources/rsxface.c +++ b/source/components/resources/rsxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c index b371f3e259fa..83420e85aab4 100644 --- a/source/components/tables/tbdata.c +++ b/source/components/tables/tbdata.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index 002b69254f85..35558a4fcda6 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -736,8 +736,11 @@ AcpiTbConvertFadt ( * Note: If the legacy length field is > 0xFF bits, ignore * this check. (GPE registers can be larger than the * 64-bit GAS structure can accommodate, 0xFF bits). + * Also skip if BitWidth is 0, indicating the 64-bit field + * was not populated - legacy length will be used instead. */ if ((ACPI_MUL_8 (Length) <= ACPI_UINT8_MAX) && + (Address64->BitWidth != 0) && (Address64->BitWidth != ACPI_MUL_8 (Length))) { ACPI_BIOS_WARNING ((AE_INFO, diff --git a/source/components/tables/tbfind.c b/source/components/tables/tbfind.c index 6c88e1eaf8d7..03280fab4ec9 100644 --- a/source/components/tables/tbfind.c +++ b/source/components/tables/tbfind.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbinstal.c b/source/components/tables/tbinstal.c index bd606170c65f..3d61d08ca9a5 100644 --- a/source/components/tables/tbinstal.c +++ b/source/components/tables/tbinstal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbprint.c b/source/components/tables/tbprint.c index 72dab8dafab2..0ba178510e43 100644 --- a/source/components/tables/tbprint.c +++ b/source/components/tables/tbprint.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index 2aeb296e7a98..893e22175c9f 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 783567cef38e..b407ebaa5a5c 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index 8a61d50f6686..52d279bd46fc 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/tables/tbxfroot.c b/source/components/tables/tbxfroot.c index 63cf27e7b2ce..fd20b1d96468 100644 --- a/source/components/tables/tbxfroot.c +++ b/source/components/tables/tbxfroot.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utaddress.c b/source/components/utilities/utaddress.c index 6d1b9aa48189..d1c3044d1530 100644 --- a/source/components/utilities/utaddress.c +++ b/source/components/utilities/utaddress.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utalloc.c b/source/components/utilities/utalloc.c index ae3c6a93649a..8b7f2a8754b6 100644 --- a/source/components/utilities/utalloc.c +++ b/source/components/utilities/utalloc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utascii.c b/source/components/utilities/utascii.c index 05918b1696b0..c989eb82bf7a 100644 --- a/source/components/utilities/utascii.c +++ b/source/components/utilities/utascii.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utbuffer.c b/source/components/utilities/utbuffer.c index b08d260b83f1..f73dd33b9071 100644 --- a/source/components/utilities/utbuffer.c +++ b/source/components/utilities/utbuffer.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcache.c b/source/components/utilities/utcache.c index 2f80c77f63e7..ee18374dda1a 100644 --- a/source/components/utilities/utcache.c +++ b/source/components/utilities/utcache.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcksum.c b/source/components/utilities/utcksum.c index 5469075c6ba6..e1391d16e415 100644 --- a/source/components/utilities/utcksum.c +++ b/source/components/utilities/utcksum.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utclib.c b/source/components/utilities/utclib.c index cf1acf0e5afd..1eab64322ede 100644 --- a/source/components/utilities/utclib.c +++ b/source/components/utilities/utclib.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utcopy.c b/source/components/utilities/utcopy.c index 338b9f9c0c07..f5163a15a14b 100644 --- a/source/components/utilities/utcopy.c +++ b/source/components/utilities/utcopy.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -918,7 +918,16 @@ AcpiUtCopySimpleObject ( break; } - AcpiUtAddReference (SourceDesc->Reference.Object); + /* + * Local/Arg/Debug references do not have a valid Object pointer + * that can be referenced + */ + if ((SourceDesc->Reference.Class != ACPI_REFCLASS_LOCAL) && + (SourceDesc->Reference.Class != ACPI_REFCLASS_ARG) && + (SourceDesc->Reference.Class != ACPI_REFCLASS_DEBUG)) + { + AcpiUtAddReference (SourceDesc->Reference.Object); + } break; case ACPI_TYPE_REGION: diff --git a/source/components/utilities/utdebug.c b/source/components/utilities/utdebug.c index 0c7dd83292c7..be83f1136491 100644 --- a/source/components/utilities/utdebug.c +++ b/source/components/utilities/utdebug.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 4f26e3aa3139..00c8fdaf2e93 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utdelete.c b/source/components/utilities/utdelete.c index 868ad0e580a6..b567a304f82c 100644 --- a/source/components/utilities/utdelete.c +++ b/source/components/utilities/utdelete.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uterror.c b/source/components/utilities/uterror.c index 6502794cf5b2..d92b31af76ef 100644 --- a/source/components/utilities/uterror.c +++ b/source/components/utilities/uterror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uteval.c b/source/components/utilities/uteval.c index d33d73655a22..cd5a5cf99527 100644 --- a/source/components/utilities/uteval.c +++ b/source/components/utilities/uteval.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utexcep.c b/source/components/utilities/utexcep.c index aa0ff78d4953..28333c7241ca 100644 --- a/source/components/utilities/utexcep.c +++ b/source/components/utilities/utexcep.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 2b953ddac14f..96e884cb1b5e 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uthex.c b/source/components/utilities/uthex.c index 7343b99c420e..79544aa49646 100644 --- a/source/components/utilities/uthex.c +++ b/source/components/utilities/uthex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utids.c b/source/components/utilities/utids.c index 9d9b07584747..0ad511747e4d 100644 --- a/source/components/utilities/utids.c +++ b/source/components/utilities/utids.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utinit.c b/source/components/utilities/utinit.c index 2299f58dd162..ccd2e1539957 100644 --- a/source/components/utilities/utinit.c +++ b/source/components/utilities/utinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utlock.c b/source/components/utilities/utlock.c index c7ee5a575bed..9886c49a9ab9 100644 --- a/source/components/utilities/utlock.c +++ b/source/components/utilities/utlock.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmath.c b/source/components/utilities/utmath.c index a3692d725b8a..faf063024de2 100644 --- a/source/components/utilities/utmath.c +++ b/source/components/utilities/utmath.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmisc.c b/source/components/utilities/utmisc.c index 7c0f9810204f..3e47633d8ed4 100644 --- a/source/components/utilities/utmisc.c +++ b/source/components/utilities/utmisc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utmutex.c b/source/components/utilities/utmutex.c index bc1a43afc062..dc5c02bdc860 100644 --- a/source/components/utilities/utmutex.c +++ b/source/components/utilities/utmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utnonansi.c b/source/components/utilities/utnonansi.c index 76fa07f6df2f..9855d8c389c6 100644 --- a/source/components/utilities/utnonansi.c +++ b/source/components/utilities/utnonansi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utobject.c b/source/components/utilities/utobject.c index 3278f0578c13..fb3468f79da4 100644 --- a/source/components/utilities/utobject.c +++ b/source/components/utilities/utobject.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index 6e034eb35816..de99801a8ed9 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utownerid.c b/source/components/utilities/utownerid.c index 31c6db05a474..e9caf194e67c 100644 --- a/source/components/utilities/utownerid.c +++ b/source/components/utilities/utownerid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utpredef.c b/source/components/utilities/utpredef.c index 1bda772a06d2..97b6b6d5706b 100644 --- a/source/components/utilities/utpredef.c +++ b/source/components/utilities/utpredef.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utresdecode.c b/source/components/utilities/utresdecode.c index 070552fc4c93..36ed3bbd8fd5 100644 --- a/source/components/utilities/utresdecode.c +++ b/source/components/utilities/utresdecode.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index c952e7621d5d..727fb89a1949 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License @@ -322,6 +322,29 @@ AcpiUtWalkAmlResources ( while (Aml < EndAml) { + /* + * Validate that the remaining buffer space can hold enough + * bytes to safely access fields during validation. + * For large resource descriptors (bit 7 set), we need enough + * bytes to access the Type field in SerialBus resources. + * Small resource descriptors only need sizeof(AML_RESOURCE_END_TAG). + */ + if ((ACPI_SIZE) (EndAml - Aml) < sizeof (AML_RESOURCE_END_TAG)) + { + return_ACPI_STATUS (AE_AML_BUFFER_LENGTH); + } + + /* + * For large resource descriptors, ensure enough space for + * the header plus SerialBus Type field access. + */ + if ((ACPI_GET8 (Aml) & ACPI_RESOURCE_NAME_LARGE) && + ((ACPI_SIZE) (EndAml - Aml) < + ACPI_OFFSET (AML_RESOURCE_COMMON_SERIALBUS, Type) + 1)) + { + return_ACPI_STATUS (AE_AML_BUFFER_LENGTH); + } + /* Validate the Resource Type and Resource Length */ Status = AcpiUtValidateResource (WalkState, Aml, &ResourceIndex); @@ -338,6 +361,15 @@ AcpiUtWalkAmlResources ( Length = AcpiUtGetDescriptorLength (Aml); + /* + * Validate that the descriptor length doesn't exceed the + * remaining buffer size to prevent reading beyond the end. + */ + if (Length > (ACPI_SIZE) (EndAml - Aml)) + { + return_ACPI_STATUS (AE_AML_BUFFER_LENGTH); + } + /* Invoke the user function */ if (UserFunction) diff --git a/source/components/utilities/utstate.c b/source/components/utilities/utstate.c index 1dbecba74da7..7ce23cc909bf 100644 --- a/source/components/utilities/utstate.c +++ b/source/components/utilities/utstate.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstring.c b/source/components/utilities/utstring.c index 19ddd2581eac..8dae542d924c 100644 --- a/source/components/utilities/utstring.c +++ b/source/components/utilities/utstring.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrsuppt.c b/source/components/utilities/utstrsuppt.c index 0c96520d4b2c..76e481daa6ea 100644 --- a/source/components/utilities/utstrsuppt.c +++ b/source/components/utilities/utstrsuppt.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utstrtoul64.c b/source/components/utilities/utstrtoul64.c index 8b927db677de..9f1cdb760e0d 100644 --- a/source/components/utilities/utstrtoul64.c +++ b/source/components/utilities/utstrtoul64.c @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/uttrack.c b/source/components/utilities/uttrack.c index fa5c49fbcf98..bee105d1f72e 100644 --- a/source/components/utilities/uttrack.c +++ b/source/components/utilities/uttrack.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utuuid.c b/source/components/utilities/utuuid.c index 5eacf9fc6d03..a29220d39f98 100644 --- a/source/components/utilities/utuuid.c +++ b/source/components/utilities/utuuid.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index 5e10fc23c528..72d36eb18a66 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxferror.c b/source/components/utilities/utxferror.c index 43e940f636b7..a4f0887a34d9 100644 --- a/source/components/utilities/utxferror.c +++ b/source/components/utilities/utxferror.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfinit.c b/source/components/utilities/utxfinit.c index 8c6da2fba74d..1cdb24594aa5 100644 --- a/source/components/utilities/utxfinit.c +++ b/source/components/utilities/utxfinit.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License diff --git a/source/components/utilities/utxfmutex.c b/source/components/utilities/utxfmutex.c index b82a4a95490a..6d94f45d87c7 100644 --- a/source/components/utilities/utxfmutex.c +++ b/source/components/utilities/utxfmutex.c @@ -8,7 +8,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2026, Intel Corp. * All rights reserved. * * 2. License |
