linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ACPICA: fix possible NULL dereference
@ 2015-09-10 10:19 Sudip Mukherjee
  0 siblings, 0 replies; only message in thread
From: Sudip Mukherjee @ 2015-09-10 10:19 UTC (permalink / raw)
  To: Robert Moore, Lv Zheng, Rafael J. Wysocki, Len Brown
  Cc: linux-kernel, linux-acpi, devel, Sudip Mukherjee

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@vectorindia.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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-09-10 10:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-10 10:19 [PATCH] ACPICA: fix possible NULL dereference Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).