bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/28824] relro security issues


From: i at maskray dot me
Subject: [Bug ld/28824] relro security issues
Date: Wed, 25 Jan 2023 03:15:37 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=28824

--- Comment #22 from Fangrui Song <i at maskray dot me> ---
> [...] (psykose/alice confirmed lld does not have the problem on alpine, but I 
> am not sure if they do the correct thing™ here security-wise -- it's good to 
> have a concrete idea here)

lld does the correct thing. I changed lld to adopt the two-RW-PT_LOAD approach
in 2019.
I have some notes about different linkers' behaviors:
https://maskray.me/blog/2020-11-15-explain-gnu-linker-options#z-noseparate-code
and
https://maskray.me/blog/2021-08-22-freebsd-src-browsing-on-linux-and-my-rtld-contribution#p_memsz-of-pt_gnu_relro
(where I fixed FreeBSD rtld to do similarly to glibc/musl . Without this, I'd
be very careful changing lld's common-page-size padding behavior).

lld still pads p_memsz of PT_GNU_RELRO (the first RW PT_LOAD) to a
common-page-size boundary instead of a max-page-size boundary.
If GNU ld now uses max-page-size boundary for all ports but x86, I think
https://sourceware.org/binutils/docs/ld/Builtin-Functions.html 
"DATA_SEGMENT_ALIGN(maxpagesize, commonpagesize)" needs a clarification: it
seels that commonpagesize is ignored for most ports?

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]