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:   Fri, 22 Dec 2017 17:54:50 +0100
From:   Borislav Petkov <bp@...e.de>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Juergen Gross <jgross@...e.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: Bug in patch "x86/pti: Add the pti= cmdline option and
 documentation"

On Fri, Dec 22, 2017 at 05:43:50PM +0100, Thomas Gleixner wrote:
> On Fri, 22 Dec 2017, Juergen Gross wrote:
> 
> > The patch in the tip tree with commit 506bcdf68b07a0335751e1fe8be37
> > ("x86/pti: Add the pti= cmdline option and documentation") is completely
> > wrong: cmdline_find_option() will return -1 in case the otion isn't
> > found and the len of the argument in case it has been found.
> 
> AArgh .....

Please fold this in:

---
diff --git a/arch/x86/mm/pti.c b/arch/x86/mm/pti.c
index 2a5c1b9bdf73..f9fd4eb74d20 100644
--- a/arch/x86/mm/pti.c
+++ b/arch/x86/mm/pti.c
@@ -69,13 +69,15 @@ static void __init pti_print_if_secure(const char *reason)
 void __init pti_check_boottime_disable(void)
 {
 	char arg[5];
+	int ret;
 
 	if (hypervisor_is_type(X86_HYPER_XEN_PV)) {
 		pti_print_if_insecure("disabled on XEN PV.");
 		return;
 	}
 
-	if (cmdline_find_option(boot_command_line, "pti", arg, sizeof(arg))) {
+	ret = cmdline_find_option(boot_command_line, "pti", arg, sizeof(arg));
+	if (ret > 0)  {
 		if (!strncmp(arg, "off", 3)) {
 			pti_print_if_insecure("disabled on command line.");
 			return;

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ