aboutsummaryrefslogtreecommitdiff
path: root/manual/memory.texi
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-08-30 16:39:41 +0200
committerFlorian Weimer <fweimer@redhat.com>2017-08-30 16:39:41 +0200
commitec2c1fcefb200c6cb7e09553f3c6af8815013d83 (patch)
tree6da867b8b565f3d200688016fef68d8de42f9ae1 /manual/memory.texi
parent9ce673b69e82578044958f66d93dcaddb23f6e95 (diff)
downloadglibc-ec2c1fcefb200c6cb7e09553f3c6af8815013d83.tar
glibc-ec2c1fcefb200c6cb7e09553f3c6af8815013d83.tar.gz
glibc-ec2c1fcefb200c6cb7e09553f3c6af8815013d83.tar.bz2
glibc-ec2c1fcefb200c6cb7e09553f3c6af8815013d83.zip
malloc: Abort on heap corruption, without a backtrace [BZ #21754]
The stack trace printing caused deadlocks and has been itself been targeted by code execution exploits.
Diffstat (limited to 'manual/memory.texi')
-rw-r--r--manual/memory.texi20
1 files changed, 9 insertions, 11 deletions
diff --git a/manual/memory.texi b/manual/memory.texi
index 82f473806c..13cce7a750 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -1309,17 +1309,15 @@ The block was already freed.
Another possibility to check for and guard against bugs in the use of
@code{malloc}, @code{realloc} and @code{free} is to set the environment
-variable @code{MALLOC_CHECK_}. When @code{MALLOC_CHECK_} is set, a
-special (less efficient) implementation is used which is designed to be
-tolerant against simple errors, such as double calls of @code{free} with
-the same argument, or overruns of a single byte (off-by-one bugs). Not
-all such errors can be protected against, however, and memory leaks can
-result. If @code{MALLOC_CHECK_} is set to @code{0}, any detected heap
-corruption is silently ignored; if set to @code{1}, a diagnostic is
-printed on @code{stderr}; if set to @code{2}, @code{abort} is called
-immediately. This can be useful because otherwise a crash may happen
-much later, and the true cause for the problem is then very hard to
-track down.
+variable @code{MALLOC_CHECK_}. When @code{MALLOC_CHECK_} is set to a
+non-zero value, a special (less efficient) implementation is used which
+is designed to be tolerant against simple errors, such as double calls
+of @code{free} with the same argument, or overruns of a single byte
+(off-by-one bugs). Not all such errors can be protected against,
+however, and memory leaks can result.
+
+Any detected heap corruption results in immediate termination of the
+process.
There is one problem with @code{MALLOC_CHECK_}: in SUID or SGID binaries
it could possibly be exploited since diverging from the normal programs