Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign updecoding malformed Vec<> can cause unrecoverable OOMs irregardless of SizeLimit #41
Comments
|
After starting to use this more extensively, I've come to believe that the check I implimented here is flawed: If we're decoding a Also, these checks aren't on the encode size, meaning that I don't see the same bounds failures when encoding (which is a bit annoying). Anyhow: I'm not sure there is a way for us to grab the size_of the actual type we care about, and these checks won't actually help us if the size of the contained type is larger than the size of the container. |
Oh dang. Yeah, that's an issue. I think this could be solved by doing the check inside of the first
This is honestly the worst part for me. I also don't think that it is possible to do because we don't get the In the mean time, I'll revert those commits and try to think of a better way to write this. |
Example:
Output:
gdb backtrace: