-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add with overflow in breakpad_symbols with fuzzed symbol file #413
Comments
In release mode, this is a backwards range call to That footgun has got us twice now (at least that I've seen, probably happened before in the past a lot more). |
Thanks! @Gankra has done a ton of great work making these crates production-ready but even that can't fix the fact that they started out as a hobby project and there were plenty of questionable implementation choices made along the way. The |
Just quickly running through my bugmail and just wanting to confirm without digging into this immediately: the panic you're seeing isn't because the Range code got the lhs and rhs mixed up again, but rather that it's blindly feeding in values from the symbol file and tripping an inner assertion because the symbol file itself is backwards? Definitely good to fix if so, great catch! This code should already have one or two places where we identify "corrupt" lines and discard them, so it should hopefully be pretty easy to add this case. |
Ah, my bad, I should have explained more. The issue is the line here: Specifically the addition on line 518. If Fix here is to check for l.size > 0 and l.address + (l.size - 1) not overflowing. Should be reasonably simple, in any case. |
Ohh sorry I completely glossed over the issue title! Yeah I think discarding any line like this as corrupt is probably the more practical solution (alternatively we could use saturating_add to try to make it vaguely work, but you still have size==0 issues). |
I'd argue that this should probably just use |
Good shout on the adding a fuzzer for this. I'll fix this tomorrow, with any luck. Also will add the fuzzer.
The text was updated successfully, but these errors were encountered: