public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug malloc/25945] New: memory block return by tcache_get()  may contain anather valid memory block pointer, leading to memory leak
@ 2020-05-08  3:35 wangxuszcn at foxmail dot com
  2020-05-08  9:51 ` [Bug malloc/25945] " wangxuszcn at foxmail dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: wangxuszcn at foxmail dot com @ 2020-05-08  3:35 UTC (permalink / raw)
  To: glibc-bugs

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

            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, may
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 =
NULL. 

patche canbe:

@@ -2936,6 +3074,7 @@ tcache_get (size_t tc_idx)
   tcache->entries[tc_idx] = e->next;
   --(tcache->counts[tc_idx]);
   e->key = NULL;
+  e->next = NULL;
   return (void *) e;
 }

BTW,can we request a CVE?

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

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

end of thread, other threads:[~2020-05-15  6:44 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-08  3:35 [Bug malloc/25945] New: memory block return by tcache_get() may contain anather valid memory block pointer, leading to memory leak wangxuszcn at foxmail dot com
2020-05-08  9:51 ` [Bug malloc/25945] " wangxuszcn at foxmail dot com
2020-05-08 12:48 ` [Bug malloc/25945] memory block return by tcache_get() may contain anather valid memory block pointer, leading to information disclosure wangxuszcn at foxmail dot com
2020-05-08 13:03 ` wangxuszcn at foxmail dot com
2020-05-08 16:19 ` carlos at redhat dot com
2020-05-08 16:20 ` [Bug malloc/25945] ASLR information leak via Safe-Linking and tcache or fastbin chunks carlos at redhat dot com
2020-05-08 16:20 ` fweimer at redhat dot com
2020-05-08 16:23 ` fweimer at redhat dot com
2020-05-08 16:44 ` carlos at redhat dot com
2020-05-08 19:18 ` dj at redhat dot com
2020-05-09  3:40 ` wangxuszcn at foxmail dot com
2020-05-09  3:45 ` wangxuszcn at foxmail dot com
2020-05-13 15:22 ` carlos at redhat dot com
2020-05-15  2:04 ` wangxuszcn at foxmail dot com
2020-05-15  6:44 ` wangxuszcn at foxmail dot com

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