lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-Id: <1513094360-1414-2-git-send-email-Vadim.Lomovtsev@caviumnetworks.com> Date: Tue, 12 Dec 2017 07:59:20 -0800 From: Vadim Lomovtsev <Vadim.Lomovtsev@...iumnetworks.com> To: robert.moore@...el.com, lv.zheng@...el.com, rafael.j.wysocki@...el.com, lenb@...nel.org, linux-acpi@...r.kernel.org, devel@...ica.org, linux-kernel@...r.kernel.org Cc: vadim.lomovtsev@...ium.com Subject: [PATCH] acpi: acpica: add acpi status check prior walking through namespace From: Vadim Lomovtsev <vadim.lomovtsev@...ium.com> While having kernel built with ACPI support enabled and booted over FDT, the ltp_acpi test from LTP suite causes kernel crash while calling acpi_ns_walk_namespace(). The acpi_get_devices is high level wrapper for it, so we need to protect kernel from crashes by adding acpi status check before walking through namespace which is not loaded because of acpi is disabled. Signed-off-by: Vadim Lomovtsev <vadim.lomovtsev@...ium.com> --- drivers/acpi/acpica/nsxfeval.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index 783f4c8..e0eb9ae 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -52,6 +52,8 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsxfeval") +extern int acpi_disabled; + /* Local prototypes */ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info); @@ -812,6 +814,11 @@ static void acpi_ns_resolve_references(struct acpi_evaluate_info *info) ACPI_FUNCTION_TRACE(acpi_get_devices); + /* check if ACPI disabled to prevent kernel crash later */ + if (acpi_disabled) { + return_ACPI_STATUS(AE_NOT_CONFIGURED); + } + /* Parameter validation */ if (!user_function) { -- 1.8.3.1
Powered by blists - more mailing lists