public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Baudis <pasky-AlSwsSmVLrQ@public.gmane.org>
To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] ld.so.8: Document LD_AUDIT and LD_POINTER_GUARD
Date: Sun, 7 Dec 2008 19:28:28 +0100	[thread overview]
Message-ID: <20081207182828.GM10491@machine.or.cz> (raw)

I was using existing comments, mailing list posts, and mainly the glibc
source code as a reference. I'm not sure if LD_AUDIT is 100% compatible
with Solaris but aside of the header names, it appears to be, based on
quick comparison.

Signed-off-by: Petr Baudis <pasky-AlSwsSmVLrQ@public.gmane.org>

diff --git a/man8/ld.so.8 b/man8/ld.so.8
index 6ca9a8c..69827f9 100644
--- a/man8/ld.so.8
+++ b/man8/ld.so.8
@@ -1,5 +1,9 @@
 .\" This is in the public domain
-.TH LD.SO 8 2008-10-27 "GNU" "Linux Programmer's Manual"
+.\"
+.\" 2008-12-07 Petr Baudis <pasky-AlSwsSmVLrQ@public.gmane.org>
+.\"    Document LD_AUDIT and LD_POINTER_GUARD
+.\"
+.TH LD.SO 8 2008-12-07 "GNU" "Linux Programmer's Manual"
 .SH NAME
 ld.so, ld-linux.so* \- dynamic linker/loader
 .SH SYNOPSIS
@@ -177,13 +181,25 @@ Version of
 for a.out binaries only.
 Old versions of ld\-linux.so.1 also supported
 .BR LD_ELF_PRELOAD .
-.\" FIXME
-.\" Document LD_AUDIT ("Install audit libraries for glibc")
-.\" new in glibc 2.4
-.\" ignored in set-user-ID and set-group-ID programs
-.\"
-.\" For some info, see Solaris Linker and Libraries Guide,
-.\" "Runtime Linker Auditing Interface"
+.TP
+.B LD_AUDIT
+(glibc since 2.4)
+A colon-separated list of additional, user-specified, ELF shared libraries
+to be loaded before all others in a separate linker namespace.
+.B LD_AUDIT
+is ignored for set-user-ID/set-group-ID binaries.
+
+The dynamic linker will notify the audit
+libraries at so-called auditing checkpoints, like loading a new library,
+resolving a symbol or calling a symbol from another shared object, by
+calling an appropriate function within the audit library (the functions
+start all with an
+.B la_
+prefix and are prototyped in
+.BR "<link.h> " and " <bits/link.h>").
+The auditing interface is compatible with Solaris as described in its
+.IR "Linker and Libraries Guide" ,
+chapter Runtime Linker Auditing Interface.
 .TP
 .B LD_BIND_NOT
 (glibc since 2.1.95)
@@ -240,18 +256,18 @@ For security reasons, since glibc 2.4,
 is ignored for set-user-ID/set-group-ID binaries.
 .\" Only used if $ORIGIN can't be determined by normal means
 .\" (from the origin path saved at load time, or from /proc/self/exe)?
-.\"
-.\" FIXME
-.\" Document LD_POINTER_GUARD
-.\" Since glibc 2.4
-.\" Set to 0 to disable pointer guarding
-.\" Any other value enables pointer guarding, which is also the default.
-.\" Pointer guarding is a security mechanism(?) to minimize the
-.\" the risk of having usable pointer in the event of a buffer overrun
-.\" or stack smashing attack(?).
-.\" http://article.gmane.org/gmane.comp.gdb.patches/41147/match=ld_pointer_guard
-.\" http://sourceware.org/ml/gdb-patches/2008-04/msg00252.html
-.\" http://www.cygwin.com/ml/libc-alpha/2006-01/msg00011.html
+.TP
+.B LD_POINTER_GUARD
+(glibc since 2.4)
+Set to 0 to disable pointer guarding.
+Any other value enables pointer guarding, which is also the default.
+Pointer guarding is a security mechanism where some pointers to code
+stored in writable program memory (return address saved by
+.BR setjmp (3)
+or function pointers used by various glibc internals) are mangled
+semi-randomly to make it more difficult for an attacker to hijack
+these to their own code in the event of a buffer overrun or stack
+smashing attack.
 .TP
 .B LD_PROFILE
 (glibc since 2.1)
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2008-12-07 18:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07 18:28 Petr Baudis [this message]
     [not found] ` <20081207182828.GM10491-DDGJ70k9y3lX+M3pkMnKjw@public.gmane.org>
2008-12-19 19:28   ` [PATCH] ld.so.8: Document LD_AUDIT and LD_POINTER_GUARD Michael Kerrisk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081207182828.GM10491@machine.or.cz \
    --to=pasky-alswssmvlrq@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox