[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1441880368-17718-1-git-send-email-sudipm.mukherjee@gmail.com>
Date: Thu, 10 Sep 2015 15:49:28 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Robert Moore <robert.moore@...el.com>,
Lv Zheng <lv.zheng@...el.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Len Brown <lenb@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-acpi@...r.kernel.org,
devel@...ica.org, Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] ACPICA: fix possible NULL dereference
acpi_ns_get_secondary_object() can return NULL, and if it returns NULL
then we were dereferencing it while calling acpi_ds_execute_arguments().
Lets have a NULL check and return AE_NOT_EXIST.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
---
drivers/acpi/acpica/dsargs.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/acpi/acpica/dsargs.c b/drivers/acpi/acpica/dsargs.c
index e2ab59e..4bb8952 100644
--- a/drivers/acpi/acpica/dsargs.c
+++ b/drivers/acpi/acpica/dsargs.c
@@ -192,6 +192,9 @@ acpi_ds_get_buffer_field_arguments(union acpi_operand_object *obj_desc)
/* Get the AML pointer (method object) and buffer_field node */
extra_desc = acpi_ns_get_secondary_object(obj_desc);
+ if (!extra_desc)
+ return_ACPI_STATUS(AE_NOT_EXIST);
+
node = obj_desc->buffer_field.node;
ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname(ACPI_TYPE_BUFFER_FIELD,
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists