Skip to content

Fix stack overflow on self-referential compression pointer - #129

Merged
samuelwilliams merged 1 commit into
Badcow:masterfrom
yeganemehr:fix/stack-overflow
Jun 21, 2026
Merged

Fix stack overflow on self-referential compression pointer#129
samuelwilliams merged 1 commit into
Badcow:masterfrom
yeganemehr:fix/stack-overflow

Conversation

@yeganemehr

Copy link
Copy Markdown
Contributor

Message::decodeName follows compression pointers by recursing without checking the chain terminates. A name pointing back into itself recurses forever will exhausting memory and can used to do a remote DoS attack.
I fixed it by adding a $depth arg and increment it per recurse, throwing an exception past 127.

@samuelwilliams
samuelwilliams merged commit d908192 into Badcow:master Jun 21, 2026
4 checks passed
@yeganemehr
yeganemehr deleted the fix/stack-overflow branch June 22, 2026 06:46
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