Skip to content

Fix aligned_realloc returning freed pointer (use-after-free) - #1069

Merged
ptitSeb merged 1 commit into
ptitSeb:masterfrom
As9xm:fix/aligned-realloc-use-after-free
Sep 11, 2026
Merged

ptitSeb merged 1 commit into
ptitSeb:masterfrom
As9xm:fix/aligned-realloc-use-after-free

Conversation

@As9xm

@As9xm As9xm commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

my_safer_scalable_aligned_realloc and my_scalable_aligned_realloc grew the allocation via box_memalign+memcpy+box_free(p), then returned p instead of new_p. Callers received a dangling pointer while the live copy leaked, causing double-ownership, heap corruption, and crashes on TBB aligned growth. Return new_p.

my_safer_scalable_aligned_realloc and my_scalable_aligned_realloc grew the allocation via box_memalign+memcpy+box_free(p), then returned p instead of new_p. Callers received a dangling pointer while the live copy leaked, causing double-ownership, heap corruption, and crashes on TBB aligned growth. Return new_p.
@ptitSeb
ptitSeb merged commit dea645b into ptitSeb:master Sep 11, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants