Flagvent 2025 (Hard) FV25.08 Kellerspeicher aufm Haufen (GNU... #1727
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Automated Content Update
This PR was automatically generated by the HackTricks News Bot based on a technical blog post.
📝 Source Information
🎯 Content Summary
This post is a technical writeup of multiple Flagvent 2025 “hard” challenges. The security-relevant one is FV25.08 (PWN), which achieves remote code execution by abusing a 32-bit integer overflow that yields a 0-byte allocation for a pointer array, enabling an out-of-bounds (OOB) pointer write into adjacent heap objects. The exploit then turns that write into (1) a heap leak, (2) a libc leak (by reading GNU obstack’s
chunkfunwhich...🔧 Technical Details
Exploit integer-overflowed allocation sizes to create “0-byte buffer, huge logical length” OOB writes: When code allocates
sizeof(ptr) * sizebut performs the multiplication in 32-bit (e.g., viaSHL EAX, 0x3) while later using a 64-bitsize_tlogical length, choosesizeso the multiplication wraps (e.g.,0x20000000 * 8 = 0x100000000 → 0in 32-bit). The program then treats the pointer array as enormous and writeselements[curr++]out-of-bounds into adjacent heap objects, enabling targeted pointer corruption.Convert a cross-object OOB write into an arbitrary read by corrupting a neighbor’s pointer field: If object A can OOB-write into object B’s pointer (e.g.,
B->elements), redirect that pointer to a sensitive address and then use an existing read primitive (likepopreading/printingelements[0]) to disclose memory. In this writeup,neben-&...🤖 Agent ActionsSummary:
chunkfunfor libc base, and hijacking obstack control flow via a forged header to callsystem("/bin/sh").Testing:
This PR was automatically created by the HackTricks Feed Bot. Please review the changes carefully before merging.