public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/25947] New: memory leak in muntrace
@ 2020-05-08  3:55 wangxuszcn at foxmail dot com
  2020-05-08  9:03 ` [Bug malloc/25947] " fw at deneb dot enyo.de
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: wangxuszcn at foxmail dot com @ 2020-05-08  3:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=25947

            Bug ID: 25947
           Summary: memory leak in muntrace
           Product: glibc
           Version: 2.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: malloc
          Assignee: unassigned at sourceware dot org
          Reporter: wangxuszcn at foxmail dot com
  Target Milestone: ---

Since glibc 2.32, stream buffer used by mallstream in mtrace() function, should
be freed in muntrace(), or 512 byte will leaked every call of mtrace().


Patches can be like this:
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index 7e7719d..b3bc5b0 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -365,4 +365,5 @@ muntrace (void)

   fprintf (f, "= End\n");
   fclose (f);
+  free (malloc_trace_buffer);
 }

Will any one request a CVE for this issue?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-08-12  1:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  3:55 [Bug malloc/25947] New: memory leak in muntrace wangxuszcn at foxmail dot com
2020-05-08  9:03 ` [Bug malloc/25947] " fw at deneb dot enyo.de
2020-05-08  9:50 ` wangxuszcn at foxmail dot com
2020-05-08 10:07 ` fw at deneb dot enyo.de
2021-08-12  1:14 ` siddhesh at sourceware dot org

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).