Module Name:    src
Committed By:   msaitoh
Date:           Fri Sep 16 08:08:01 UTC 2022

Modified Files:
        src/sys/external/bsd/acpica/dist/dispatcher: dswexec.c

Log Message:
Fix out of range access in AcpiDsExecEndOp().

 - Found by kUBSan.
 - See: https://github.com/acpica/acpica/pull/745


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.16 -r1.2 \
    src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c
diff -u src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c:1.1.1.16 src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c:1.2
--- src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c:1.1.1.16	Sat Aug 27 14:02:03 2022
+++ src/sys/external/bsd/acpica/dist/dispatcher/dswexec.c	Fri Sep 16 08:08:01 2022
@@ -461,9 +461,11 @@ AcpiDsExecEndOp (
 
         /*
          * All opcodes require operand resolution, with the only exceptions
-         * being the ObjectType and SizeOf operators.
+         * being the ObjectType and SizeOf operators as well as operands that
+	 * take no arguments.
          */
-        if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE))
+        if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE) &&
+	    (WalkState->OpInfo->Flags & AML_HAS_ARGS))
         {
             /* Resolve all operands */
 

Reply via email to