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]
Message-ID: <261ae869-4169-296e-f673-5c08ff34bdde@zytor.com>
Date:   Mon, 13 Jan 2020 17:57:23 -0800
From:   "H. Peter Anvin" <hpa@...or.com>
To:     Kees Cook <keescook@...omium.org>,
        Arvind Sankar <nivedita@...m.mit.edu>
Cc:     Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, linux-kernel@...r.kernel.org,
        Thomas Lendacky <Thomas.Lendacky@....com>,
        Mauro Rossi <issor.oruam@...il.com>,
        Michael Matz <matz@...e.de>
Subject: Re: [PATCH v3] x86/vmlinux: Fix vmlinux.lds.S with pre-2.23 binutils

On 2020-01-13 17:53, Kees Cook wrote:>>
>> diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
>> index 3a1a819da137..bad4e22384dc 100644
>> --- a/arch/x86/kernel/vmlinux.lds.S
>> +++ b/arch/x86/kernel/vmlinux.lds.S
>> @@ -144,10 +144,12 @@ SECTIONS
>>  		*(.text.__x86.indirect_thunk)
>>  		__indirect_thunk_end = .;
>>  #endif
>> +
>> +		/* End of text section */
>> +		_etext = .;
>>  	} :text =0xcccc
>>  
>> -	/* End of text section, which should occupy whole number of pages */
>> -	_etext = .;
>> +	/* .text should occupy whole number of pages */
>>  	. = ALIGN(PAGE_SIZE);
> 
> NAK: linkers can add things at the end of .text that will go missing from
> the kernel if _etext isn't _outside_ the .text section, truly beyond the
> end of the .text section. This patch will break Control Flow Integrity
> checking since the jump tables are at the end of .text.
> 
> Boris, we're always working around weird linker problems; I don't see a
> problem with the v2 patch to fix up old binutils...
> 

Why not add the marker into a separate section instead of leaving it as an
absolute "floater"? Very old binutils would botch that case, but I think that
has been long since addressed well below our current minimum version.

	-hpa



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ