From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2A7AA386F447; Fri, 8 May 2020 03:35:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A7AA386F447 From: "wangxuszcn at foxmail dot com" To: glibc-bugs@sourceware.org Subject: [Bug malloc/25945] New: memory block return by tcache_get() may contain anather valid memory block pointer, leading to memory leak Date: Fri, 08 May 2020 03:35:18 +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.26 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:35:18 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25945 Bug ID: 25945 Summary: memory block return by tcache_get() may contain anather valid memory block pointer, leading to memory leak Product: glibc Version: 2.26 Status: UNCONFIRMED Severity: normal Priority: P2 Component: malloc Assignee: unassigned at sourceware dot org Reporter: wangxuszcn at foxmail dot com Target Milestone: --- The malloc function in the GNU C Library (aka glibc or libc6) since 2.26, m= ay return a memory block which contain another valid memory block pointer, potentially leading to memory leak. This occurs because the function tcache_get() of per-thread cache (aka tcache) feature does not set e->next = =3D NULL.=20 patche canbe: @@ -2936,6 +3074,7 @@ tcache_get (size_t tc_idx) tcache->entries[tc_idx] =3D e->next; --(tcache->counts[tc_idx]); e->key =3D NULL; + e->next =3D NULL; return (void *) e; } BTW,can we request a CVE? --=20 You are receiving this mail because: You are on the CC list for the bug.=