[PATCH] gold: Add -Bsymbolic-non-weak-functions

Florian Weimer fweimer@redhat.com
Tue Jun 8 12:32:14 GMT 2021


* Fangrui Song:

> On Wed, Jun 2, 2021 at 9:28 PM Fangrui Song <i@maskray.me> wrote:
>>
>> :)
>
> We can look at this from a different angle: security hardening.
>
> @CarlosODonell: LD_PRELOAD/AUDIT give you concealment with no other
> privileges. You have several options. Disable semantic interposition
> in the way you build your binaries (see MaskRay's work). Disable
> PRELOAD/AUDIT, which is what I'm going to pursue e.g. system-wide
> glibc hardening tunable.
>
> If LD_PRELOAD is disabled, it feels very natural that we should claim
> the -Bsymbolic-non-weak-functions benefit.
> Or look it differently: -Bsymbolic-non-weak-functions reduces the
> attack surface of arbitrarily binding default visibility functions
> elsewhere.

LD_PRELOAD does not cross a trust boundary (as long as it is correctly
implemented by the dynamic loader).

LD_PRELOAD can be used for hot-patching away security vulnerabilities,
by interposing a fixed function.

This argument goes both ways, I think.

Thanks,
Florian



More information about the Binutils mailing list