hardening breaks X.org
ajax at redhat.com
Thu Mar 19 17:04:24 UTC 2015
On Thu, 2015-03-19 at 11:36 +0100, Florian Weimer wrote:
> On 03/02/2015 02:16 AM, David Airlie wrote:
> > So the rebuild to use hardened builds by default in rawhide, broke X.org.
> > Thanks guys, my system is more secure, but I can't run any apps.
> > Anyways enough snark from me, the problem seems to be that hardening
> > makes bind now override RTLD_LAZY options, and the X server relies
> > on the RTLD_LAZY on its drivers being lazy.
> Why is that?
> (I'm just collecting corner cases for ld.so oddities.)
Historical accident that's always been too invasive of a change to
bother fixing. In XFree86's driver model (which, it should be
remembered, used to reimplement its own libdl, badly) drivers request
that various subsystems they need loaded, but then call functions in
those loaded modules by name (as opposed to dlsym'ing for everything
they need). So your driver ends up with a bunch of stuff like:
dmt:~% nm -aDu /usr/lib64/xorg/**/intel_drv.so | grep ' U fb' | head -10
Those are provided by libfb, which intel itself loads by calling
LoadModule() in its setup callback. So if you set -z now on
intel_drv.so, libfb isn't loaded yet, and things go boom.
More information about the devel