Re: [ANNOUNCE] Release Digsig 1.3.1: kernel module for run-time authentication of binaries

Serge E. Hallyn
2004-09-09T18:48:27Z

> > When a file is being executed, deny_write_access(file) is called to
> > prevent writing until execution completes. Because deny_write_access
> > is not exported from fs/namei.c, we emulate this behavior for shared
> > libraries.
>
> Hmm, ok, so you're relying on the loader to do PROT_EXEC mmaps for
> shared libraries? Probably not required at least on x86.

Correct.

We don't pretend to stop someone from mmap'ing and executing bad code, we
only want to help someone who wants to use a legitimate library to know that
the right library is being used.

> Also, does
> this work when executing loader directly (/lib/ld.so /bin/ps), and with
> dlopen?

Yup, both of these (at least on i386) use mmap with PROT_EXEC, and go
through digsig's dsi_file_mmap check. (I've made a note to check the
/lib/ld.so /bin/ps case on a powerpc and, if I can find one, z)

-serge