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, 31 Oct 2014 15:25:48 +0800
From:	Eternal <eternal.n08@...il.com>
To:	Mika Penttilä <mika.j.penttila@...il.com>
Cc:	linux-kernel@...r.kernel.org, fengguang.wu@...el.com,
	eternal.n08@...il.com
Subject: Re: [PATCH] x86, kaslr: Prevent .bss from overlaping initrd

Mika Penttilä <mika.j.penttila@...il.com> writes:

>> When choosing a random address, the current implementation does not take into
>> account the reversed space for .bss and .brk sections. Thus the relocated kernel
>> may overlap other components in memory, e.g. the initrd image:
>
> initrd should be included in the avoid arrays already, and bss is
> included in the output_size
>
> for choose_kernel_location(). So something else is going on?

output_size = sizeof(vmlinux.bin) + sizeof(vmlinux.relocs)

vmlinux.bin is an ELF file that contains a section header for .bss. Thus
output_size does not include sizeof(.bss).

Best Regards
Junjie Mao

>
> --Mika
>
> On Thu, Oct 30, 2014 at 9:06 PM, Mika Penttilä
> <mika.j.penttila@...il.com> wrote:
>>> When choosing a random address, the current implementation does not take
>>> into
>>> account the reversed space for .bss and .brk sections. Thus the relocated
>>> kernel
>>> may overlap other components in memory, e.g. the initrd image:
>>
>> initrd should be included in the avoid arrays already, and bss is included
>> in the output_size
>>
>> for choose_kernel_location(). So something else is going on?
>>
>> --Mika
>>
>>
--
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