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:   Mon, 13 Jan 2020 22:58:59 -0500
From:   Arvind Sankar <nivedita@...m.mit.edu>
To:     "H. Peter Anvin" <hpa@...or.com>
Cc:     Kees Cook <keescook@...omium.org>,
        Arvind Sankar <nivedita@...m.mit.edu>,
        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 Mon, Jan 13, 2020 at 05:57:23PM -0800, H. Peter Anvin wrote:
> 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
> 
> 
> 

Kees, thanks, I noted in the other email that you had mentioned this in
a since-reverted commit, but you did not mention in the most recent
commit.

hpa, I think this runs afoul of the bug you noted in commit fd952815307f
("x86-32, relocs: Whitelist more symbols for ld bug workaround"), ld
version 2.22.52.0.[12] can incorrectly promote relative symbols to
absolute, if the output section they appear in is otherwise empty.

That's 2.22, which is more recent than the 2.21 that the kernel
documents as supported.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ