Skip to content

reject oversize punycode length in rust demangler#2108

Open
nabhan06 wants to merge 1 commit into
abseil:masterfrom
nabhan06:rust-demangle-punycode-length
Open

reject oversize punycode length in rust demangler#2108
nabhan06 wants to merge 1 commit into
abseil:masterfrom
nabhan06:rust-demangle-punycode-length

Conversation

@nabhan06

Copy link
Copy Markdown
Contributor

in ParseUndisambiguatedIdentifier a punycoded identifier's decimal byte count is used to form punycode_end = &encoding_[pos_] + num_bytes before it is checked against the input, so a mangled name like _RNvC7ice_caps_u2000000000Eyjafjallajkull_jtb makes that pointer land far past the end of the buffer (out-of-bounds pointer arithmetic); reject a length larger than the remaining input first, matching how the non-punycode branch already stops at the NUL terminator.

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.

1 participant