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-next>] [day] [month] [year] [list]
Message-Id: <E1VnzBi-0005yF-MU@eag09.americas.sgi.com>
Date:	Tue, 03 Dec 2013 17:15:30 -0600
From:	cpw <cpw@....com>
To:	linux-kernel@...r.kernel.org
Cc:	mingo@...e.hu, x86@...nel.org
Subject: [PATCH] x86, UV: null pointer in uv_flush_tlb_others()


The SGI UV tlb shootdown code panics the system with a null pointer
deference if 'nobau' is specified on the boot commandline.

uv_flush_tlb_other() gets called for every flush, whether the BAU is disabled
or not.  It should not be keeping the s_enters statistic while the BAU
is disabled.
The panic occurs because, during initialization, init_per_cpu_tunables()
does not set the bcp->statp pointer if nobau was specified.

The code is the same in the 3.12.2 tree.

Cc: <stable@...r.kernel.org> # 3.12.x
Signed-off-by: Cliff Wickman <cpw@....com>
---
 arch/x86/platform/uv/tlb_uv.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: linux/arch/x86/platform/uv/tlb_uv.c
===================================================================
--- linux.orig/arch/x86/platform/uv/tlb_uv.c
+++ linux/arch/x86/platform/uv/tlb_uv.c
@@ -1070,12 +1070,13 @@ const struct cpumask *uv_flush_tlb_other
 	unsigned long status;
 
 	bcp = &per_cpu(bau_control, cpu);
-	stat = bcp->statp;
-	stat->s_enters++;
 
 	if (bcp->nobau)
 		return cpumask;
 
+	stat = bcp->statp;
+	stat->s_enters++;
+
 	if (bcp->busy) {
 		descriptor_status =
 			read_lmmr(UVH_LB_BAU_SB_ACTIVATION_STATUS_0);
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ