This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18292] Invalid pointer dereference in nsswitch.c:nss_new_service()
- From: "fweimer at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 29 Apr 2015 13:52:50 +0000
- Subject: [Bug libc/18292] Invalid pointer dereference in nsswitch.c:nss_new_service()
- Auto-submitted: auto-generated
- References: <bug-18292-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18292
Florian Weimer <fweimer at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fweimer at redhat dot com
Flags| |security-
--- Comment #10 from Florian Weimer <fweimer at redhat dot com> ---
(In reply to Justin N. Ferguson from comment #1)
> repro:
> set prev_size member of chunk to non-zero value that doesn't properly
> dereference. execute "ls -al".
I assume that this is about the prev_size member of the following chunk. Have
you increased the chunk size accordingly (by the size of a pointer)? If not,
your malloc invalid because prev_size is only available if the preceding chunk
is free, as explained in comment #2.
The fundamental idea behind the free space management in dlmalloc and similar
allocators is to use the trailing end of a free chunk to store a pointer (or
offset) to its beginning, so that when the subsequent chunk is freed, it can be
merged with the preceding one. Without the information prev_size provides, it
would not be possible to find the start of the chunk to merge with. This is
explained on page 28 of <ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps> and
sometimes called a âboundary tagâ mechanism.
valgrind also does not show any out-of-bounds references, and it is usually
very precise for such issues.
--
You are receiving this mail because:
You are on the CC list for the bug.