-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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 error while parsing BJData (Invalid-bool-value) #3490
Labels
aspect: binary formats
BSON, CBOR, MessagePack, UBJSON
confirmed
kind: bug
release item: 🐛 bug fix
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
Comments
FYI @fangq |
I analyzed this bug a bit and it seems as if a parse error is not detected and the SAX-DOM parser blows up because of an invalid invariant: it assumes parsing an array, but an unexpected key event comes in which tries to use I will try to add some assertions there to make this more explicit. |
This was referenced May 17, 2022
fangq
added a commit
to NeuroJSON/json
that referenced
this issue
May 17, 2022
fangq
added a commit
to NeuroJSON/json
that referenced
this issue
May 17, 2022
nlohmann
pushed a commit
that referenced
this issue
May 18, 2022
…3491,#3492,#3490) (#3500) * Discard optimized containers with negative counts in UBJSON/BJData (#3491,#3492,#3490) * fix msvc error * update unit tests for negative sized containers * use a loop to test 0 ndarray dimension * throw an error when count is negative, merge CHECK_THROW_AS and _WITH with _WITH_AS
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
aspect: binary formats
BSON, CBOR, MessagePack, UBJSON
confirmed
kind: bug
release item: 🐛 bug fix
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Description
OSS-Fuzz reports a runtime error: load of value 16, which is not a valid value for type 'bool' when fuzzing with UBSAN.
Reproduction steps
Expected vs. actual results
Expected: parse error or valid JSON value returned
Actual: UBSAN runtime error
Minimal code example
No response
Error messages
Compiler and operating system
OSS-Fuzz
Library version
develop
Validation
develop
branch is used.The text was updated successfully, but these errors were encountered: