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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 10 Aug 2016 11:11:41 -0700
From:	tip-bot for Mike Travis <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	akpm@...ux-foundation.org, rja@....com, mingo@...nel.org,
	estabrook@....com, linux-kernel@...r.kernel.org,
	peterz@...radead.org, hpa@...or.com, nzimmer@....com,
	athorlton@....com, abanman@....com, sivanich@....com,
	tglx@...utronix.de, framsay@....com, travis@....com,
	torvalds@...ux-foundation.org
Subject: [tip:x86/urgent] x86/platform/UV: Fix bug with iounmap() of the UV4
 EFI System Table causing a crash

Commit-ID:  e363d24c2b997c421476c6aa00547edadf678efe
Gitweb:     http://git.kernel.org/tip/e363d24c2b997c421476c6aa00547edadf678efe
Author:     Mike Travis <travis@....com>
AuthorDate: Mon, 1 Aug 2016 13:40:51 -0500
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Wed, 10 Aug 2016 15:55:38 +0200

x86/platform/UV: Fix bug with iounmap() of the UV4 EFI System Table causing a crash

Save the uv_systab::size field before doing the iounmap()
of the struct pointer, to avoid a NULL dereference crash.

Tested-by: Frank Ramsay <framsay@....com>
Tested-by: John Estabrook <estabrook@....com>
Signed-off-by: Mike Travis <travis@....com>
Reviewed-by: Dimitri Sivanich <sivanich@....com>
Reviewed-by: Nathan Zimmer <nzimmer@....com>
Cc: Alex Thorlton <athorlton@....com>
Cc: Andrew Banman <abanman@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Russ Anderson <rja@....com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/20160801184050.250424783@asylum.americas.sgi.com
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 arch/x86/platform/uv/bios_uv.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/x86/platform/uv/bios_uv.c b/arch/x86/platform/uv/bios_uv.c
index 66b2166..4e9fd13 100644
--- a/arch/x86/platform/uv/bios_uv.c
+++ b/arch/x86/platform/uv/bios_uv.c
@@ -199,12 +199,14 @@ void uv_bios_init(void)
 		return;
 	}
 
+	/* Starting with UV4 the UV systab size is variable */
 	if (uv_systab->revision >= UV_SYSTAB_VERSION_UV4) {
+		int size = uv_systab->size;
+
 		iounmap(uv_systab);
-		uv_systab = ioremap(efi.uv_systab, uv_systab->size);
+		uv_systab = ioremap(efi.uv_systab, size);
 		if (!uv_systab) {
-			pr_err("UV: UVsystab: ioremap(%d) failed!\n",
-				uv_systab->size);
+			pr_err("UV: UVsystab: ioremap(%d) failed!\n", size);
 			return;
 		}
 	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ