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:   Fri, 3 Mar 2017 15:28:30 +0100
From:   Borislav Petkov <bp@...e.de>
To:     Baoquan He <bhe@...hat.com>
Cc:     tglx@...utronix.de, hpa@...or.com, mingo@...hat.com,
        linux-kernel@...r.kernel.org, x86@...nel.org,
        keescook@...omium.org, yinghai@...nel.org, anderson@...hat.com,
        luto@...nel.org, thgarnie@...gle.com, kuleshovmail@...il.com
Subject: Re: [PATCH v4 1/3] x86: Introduce a new constant KERNEL_MAPPING_SIZE

On Fri, Mar 03, 2017 at 09:11:52PM +0800, Baoquan He wrote:
> And another meaning of defining kernel iamge size and mapping size
> differently is we can randomize the limited kernel image in the mapping
> area. If they are the same or kernel image can be very large, the
> position will be fixed or very few, kernel text KASLR will be
> meaningless.

This is simply not true:

@@ -408,9 +408,9 @@ static unsigned long find_random_virt_addr(unsigned long minimum,
        /*
         * There are how many CONFIG_PHYSICAL_ALIGN-sized slots
         * that can hold image_size within the range of minimum to
-        * KERNEL_IMAGE_SIZE?
+        * KERNEL_MAPPING_SIZE?
         */
-       slots = (KERNEL_IMAGE_SIZE - minimum - image_size) /
+       slots = (KERNEL_MAPPING_SIZE - minimum - image_size) /
                 CONFIG_PHYSICAL_ALIGN + 1;

*With* kaslr, KERNEL_IMAGE_SIZE = 1G and KERNEL_MAPPING_SIZE = 1G.
Before your patch KERNEL_IMAGE_SIZE = 1G too with kaslr enabled.

-- 
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