Comment 4 for bug 131976

Revision history for this message
Kees Cook (kees) wrote : Re: [Bug 131976] Re: package cupsys 1.2.12-3ubuntu2 failed to install/upgrade: subprocess post-installation script returned error exit status 127

Wow; I've never seen that before. I'm doubting this is from ASLR;
that's unchanged since Edgy. And the /etc/apparmor.d/abstractions/base
file correctly includes:

  /lib/tls/i686/cmov/lib*.so* mr,

So I'm at a loss for what that means. Code-diving shows this to be an
error from libc where it can't call mprotect relro on itself:

void internal_function
_dl_protect_relro (struct link_map *l)
{
  ElfW(Addr) start = ((l->l_addr + l->l_relro_addr)
              & ~(GLRO(dl_pagesize) - 1));
  ElfW(Addr) end = ((l->l_addr + l->l_relro_addr + l->l_relro_size)
            & ~(GLRO(dl_pagesize) - 1));

  if (start != end
      && __mprotect ((void *) start, end - start, PROT_READ) < 0)
    {
      static const char errstring[] = N_("\
cannot apply additional memory protection after relocation");
      _dl_signal_error (errno, l->l_name, NULL, errstring);
    }
}