This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Support LD_USE_LOAD_BIAS


On Fri, Nov 21, 2003 at 04:28:09PM -0800, Roland McGrath wrote:
> > I think LD_USE_LOAD_BIAS shouldn't be honored for suid/sgid, as that way
> > a local attacker could disable randomization of a suid PIE and exploit it
> > more easily.  This patch is on top of the previously posted one.
> 
> I agree.  You should also add it to the unsecvars.h list.

unsecvars.h is changed in the first patch already.

> As to the original patch, I don't like the names but otherwise it seems
> reasonable to me.  _dl_use_load_bias should be called _dl_load_bias_mask

I'll change that.

> since you use it that way.  For the environment variable, I think something
> like LD_INHIBIT_PRELINK would be better.

LD_USE_LOAD_BIAS is what Ulrich suggested.  LD_INHIBIT_PRELINK can be
misleading IMHO.  One thing is if prelink info is or is not used
and a different is whether library load biases are honored or not.
What I'd assume from LD_INHIBIT_PRELINK would be to not use prelinking
information, ie. something like:
  if (GL(dl_loaded)->l_info [ADDRIDX (DT_GNU_LIBLIST)]
      && ! __builtin_expect (GL(dl_profile) != NULL, 0)
+     && LD_INHIBIT_PRELINKG_not_present_in_environment)
    {
      check if prelink info can be used and set prelinked = true if yes
    }

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]