From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9A9AD386F447; Fri, 8 May 2020 03:55:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9A9AD386F447 From: "wangxuszcn at foxmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug malloc/25947] New: memory leak in muntrace Date: Fri, 08 May 2020 03:55:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: malloc X-Bugzilla-Version: 2.3.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wangxuszcn at foxmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 May 2020 03:55:09 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25947 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, sh= ould 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, "=3D End\n"); fclose (f); + free (malloc_trace_buffer); } Will any one request a CVE for this issue? --=20 You are receiving this mail because: You are on the CC list for the bug.=