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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 8 Oct 2016 15:44:36 +0800
From:   Dou Liyang <douly.fnst@...fujitsu.com>
To:     <tglx@...utronix.de>, <yinghai@...nel.org>, <mingo@...nel.org>,
        <hpa@...or.com>
CC:     <linux-tip-commits@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <x86@...nel.org>,
        <douly.fnst@...fujitsu.com>
Subject: [PATCH 1/2] x86/acpi: Fix the local APIC id validation in case of 0xff

In MADT, the 0xff is an invalid local APIC id.

When the kernel uses both the local APIC id and x2apic id, it may
affect x2apic.

Only add validation when the kernel parse the local APIC ids.

Reported-by: Yinghai Lu <yinghai@...nel.org>
Signed-off-by: Dou Liyang <douly.fnst@...fujitsu.com>
---
 arch/x86/kernel/acpi/boot.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index 32a7d70..d642c95 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -233,6 +233,10 @@ acpi_parse_lapic(struct acpi_subtable_header * header, const unsigned long end)
 
 	acpi_table_print_madt_entry(header);
 
+	/* the 0xff is an invalid local APIC id */
+	if (processor->id == 0xff)
+		return -EINVAL;
+
 	/*
 	 * We need to register disabled CPU as well to permit
 	 * counting disabled CPUs. This allows us to size
-- 
2.5.5



Powered by blists - more mailing lists