fwts: segfaults on --disassemble-aml with some ACPI tables.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
fwts (Ubuntu) |
Fix Released
|
High
|
Colin Ian King |
Bug Description
Commit d4fcca77cc3536a
Looking at the same acpica core built into the iasl tool we can reproduce this fault:
Program received signal SIGSEGV, Segmentation fault.
0x000000000043867e in AcpiDmFieldPred
at ../../.
334 if (ACPI_COMPARE_NAME (Tag, Info->Name))
(gdb) print Tag
$1 = 0x0
(gdb) print Info->Name
$2 = 0x49d060 "_ACx"
(gdb)
Patch from Robert Moore at Intel fixes this:
diff --git a/source/
index 9afaad3..3097f15 100644
--- a/source/
+++ b/source/
@@ -541,6 +541,11 @@ AcpiDmCheckReso
/* Get the Index term, must be an integer constant to convert */
IndexOp = BufferNameOp-
+
+ /* Major cheat: The Node field is also used for the Tag ptr. Clear it now */
+
+ IndexOp-
+
OpInfo = AcpiPsGetOpcodeInfo (IndexOp-
if (OpInfo->ObjectType != ACPI_TYPE_INTEGER)
{
diff --git a/source/
index c3771b5..342e861 100644
--- a/source/
+++ b/source/
@@ -326,6 +326,10 @@ AcpiDmFieldPred
/* Major cheat: We previously put the Tag ptr in the Node field */
Tag = ACPI_CAST_PTR (char, IndexOp-
+ if (!Tag)
+ {
+ return;
+ }
/* Match the name in the info table */
Related branches
Changed in fwts (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Colin King (colin-king) |
summary: |
- fwts: segfaults on --disassemble-aml with some acpitables. + fwts: segfaults on --disassemble-aml with some ACPI tables. |
Changed in fwts (Ubuntu): | |
status: | In Progress → Fix Committed |
Patch merged into fwts and sent to the mailing list.