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: <20140211100837.GA17202@dhcp-16-126.nay.redhat.com>
Date:	Tue, 11 Feb 2014 18:08:38 +0800
From:	Dave Young <dyoung@...hat.com>
To:	keescook@...omium.org, hpa@...or.com, vgoyal@...hat.com,
	linux-kernel@...r.kernel.org
Subject: [PATCH] disable kaslr in kdump kernel


KASLR does not work in kdump kernel because it's too early that mem=exactmap
has not been parsed.

Since KASLR does not make much sense for kdump kernel thus let's disable it
for kdump kernel. To check if it is a kdump kernel I just check the cmdline
param elfcorehdr just like is_kdump_kernel.

Signed-off-by: Dave Young <dyoung@...hat.com>
---
 linux-2.6/arch/x86/boot/compressed/aslr.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: dyoung/git/linux-2.6/arch/x86/boot/compressed/aslr.c
===================================================================
--- linux-2.6/arch/x86/boot/compressed/aslr.c
+++ linux-2.6/arch/x86/boot/compressed/aslr.c
@@ -293,6 +293,11 @@ unsigned char *choose_kernel_location(un
 		goto out;
 	}
 
+	if (cmdline_find_option("elfcorehdr", NULL, 0) != -1) {
+		debug_putstr("KASLR disabled...\n");
+		goto out;
+	}
+
 	/* Record the various known unsafe memory ranges. */
 	mem_avoid_init((unsigned long)input, input_size,
 		       (unsigned long)output, output_size);
--
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