-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
UBSAN: index out of bounds #1291
Comments
I did a quick analysis of file This crashes in a slightly different place than in issue #1289: the immediate cause within
However, this doesn't answer how h->maxcode[k] became non-monotonic by itself. This seems to be ultimately the same mechanism as in issue #1289! The sum of the sizes array is greater than 256, so we get writes past the end of |
Mainstream pull requests: nothings/stb#1230 nothings/stb#1223 nothings/stb#1297 Related mainstream issue tickets: nothings/stb#1224 nothings/stb#1225 nothings/stb#1289 nothings/stb#1291 nothings/stb#1292 nothings/stb#1293
Tested and confirmed fixed by Neil's changes, now in dev branch. Will be fixed in the next release. |
Fixed in 2.28. |
Describe the bug
Several UBSAN violations possibly related to #1289
The zip attached contains the testcases that trigger the violation
To Reproduce
Built stb according to the oss-fuzz script with
CXXFLAGS='-O1 -fsanitize=address -fsanitize=array-bounds,bool,builtin,enum,float-divide-by-zero,function,integer-divide-by-zero,null,object-size,return,returns-nonnull-attribute,shift,signed-integer-overflow,unreachable,vla-bound,vptr'
Sample output
Crashing files
ubsan-out-of-bounds.zip
The text was updated successfully, but these errors were encountered: