TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

On exploiting the jemalloc memory manager (2014)

36 pointsby jxubalmost 7 years ago

1 comment

davidtgoldblattalmost 7 years ago
Another fun attack vector that I don&#x27;t think has been well explored yet involves the use of C++ sized deallocation functions. If a base class is missing a virtual destructor, or if an array allocated with new[] is deallocated with delete (instead of delete[]), then the allocation can be freed with an incorrect size parameter. If this happens, you can trigger some of the same sorts of state corruption issues that a double-free would cause (you set a random bitmap bit to &quot;free&quot; in the metadata, since you&#x27;re calculating offsets from the start of a slab incorrectly).<p>Valgrind won&#x27;t ever catch this, and Address Sanitizer won&#x27;t always (it depends on both the exact type of bug, and the sanitization settings).
评论 #17779174 未加载