public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "law at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/14277] Pointer used after free'd
Date: Thu, 21 Jun 2012 18:00:00 -0000	[thread overview]
Message-ID: <bug-14277-131-9ZQO8QH1Rf@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-14277-131@http.sourceware.org/bugzilla/>

http://sourceware.org/bugzilla/show_bug.cgi?id=14277

--- Comment #2 from law at redhat dot com 2012-06-21 18:00:06 UTC ---
M_PERTURB does work for realloc (which just calls free internally).  I can even
verify that it puts my perturb bytes into the free'd memory.  All fine and
good.

Unfortunately after installing my perturb byte, something else inside malloc
decides to put the value 0 into the first 4 bytes of the free'd memory,
overwriting my nice invalid pointer perturb byte ;(

That happens to correspond to transmem_list->next.  When we then try to use the
value, it just looks like a null pointer, which the code assumes is the end of
the list.  So M_PERTURB isn't particularly helpful in generating a testcase for
this bug.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


  parent reply	other threads:[~2012-06-21 18:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-21 16:05 [Bug libc/14277] New: " law at redhat dot com
2012-06-21 16:21 ` [Bug libc/14277] " joseph at codesourcery dot com
2012-06-21 18:00 ` law at redhat dot com [this message]
2012-06-21 19:24 ` aj at suse dot de
2012-06-21 19:27 ` aj at suse dot de
2012-06-21 23:34 ` bugdal at aerifal dot cx
2012-06-22  8:20 ` aj at suse dot de
2014-06-18  4:35 ` fweimer at redhat dot com

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=bug-14277-131-9ZQO8QH1Rf@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).