All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Hannes Reinecke <hare@suse.de>
Cc: dm-devel@redhat.com
Subject: double free in recent multipath-tools
Date: Wed, 22 Apr 2009 18:05:44 -0400	[thread overview]
Message-ID: <20090422220544.GH32602@redhat.com> (raw)


Seems the latest multipath-tools has an issue with a double free.  I
haven't looked at what the proper fix is yet but I wanted to give others
a heads up.

Running something as basic as 'multipath' drops a core.

The recent commit 37b079e555c459bd902a3855f223e3803aeb1fbe appears to
have the offending hunk:

@@ -404,6 +410,12 @@ free_config (struct config * conf)
        if (conf->checker_name)
                FREE(conf->checker_name);
 
+       if (conf->prio_name)
+               FREE(conf->prio_name);
+
+       if (conf->checker_name)
+               FREE(conf->checker_name);
+
        free_blacklist(conf->blist_devnode);
        free_blacklist(conf->blist_wwid);
        free_blacklist_device(conf->blist_device);


(gdb) bt
#0  0x0000003a6ec32f05 in raise () from /lib64/libc.so.6
#1  0x0000003a6ec34a73 in abort () from /lib64/libc.so.6
#2  0x0000003a6ec72438 in __libc_message () from /lib64/libc.so.6
#3  0x0000003a6ec77ec8 in malloc_printerr () from /lib64/libc.so.6
#4  0x0000003a6ec7a486 in free () from /lib64/libc.so.6
#5  0x00007ffff7dbc205 in xfree (p=0x60b2e0) at memory.c:52
#6  0x00007ffff7dc3624 in free_config (conf=0x604620) at config.c:414
#7  0x00000000004027a4 in main (argc=3, argv=0x7fffffffe718) at main.c:474
(gdb) frame 6
#6  0x00007ffff7dc3624 in free_config (conf=0x604620) at config.c:414
(gdb) l
409
410             if (conf->checker_name)
411                     FREE(conf->checker_name);
412
413             if (conf->prio_name)
414                     FREE(conf->prio_name);
415
416             if (conf->checker_name)
417                     FREE(conf->checker_name);
418

             reply	other threads:[~2009-04-22 22:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-22 22:05 Mike Snitzer [this message]
2009-04-23  1:18 ` [PATCH] fix double frees in recent multipath-tools Mike Snitzer
2009-04-28 21:54   ` christophe.varoqui
2009-04-28 22:04     ` Mike Snitzer

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=20090422220544.GH32602@redhat.com \
    --to=snitzer@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hare@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.