-
Notifications
You must be signed in to change notification settings - Fork 22
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
Malformed EXI Document Causes Decoding Error #99
Comments
The description is incorrect, as there is no "assertion failure" in cbexigen or its generated code. (This assertion triggers in the wrapping code from libiso15118.) I think what you are trying to describe is that the cbv2g EXI codec should return an error on decoding this document, but doesn't, right? How was this document created? What does it represent? How is it malformed? Is it random? The nature of EXI implies a knowledge of the grammar on both sides, the encoder and the decoder. If you throw something random at the decoder which resembles an EXI stream, and (even coincidentally) adheres to a chain of decoder grammars, no error will be detected. If the streams contains a bit sequence which is not allowed according to the schema-informed decoder grammar, the decoder will return an error. If you can describe why the given document should be decoded differently, please do so. It would also be nice if you could create a reproducer based only on libcbv2g code. |
This one is not the assertion failure. I opened a second one that resulted in an assertion failure in libiso15118. The other bug I opened (#100) is the assertion failure. Unfortunately I only reproduced these through libiso15118. I was only told to re-open this here from the libiso15118 repository. These were crashes were found with fuzzing. |
This was originally opened here. |
The EXI stream is not strictly illegal. Your encoding is choosing a particle which isn't supposed to be there. The user of the codec currently needs to catch this. This was an omission in libiso15118, which will be fixed. An alternative is the solution outlined in issue #101, where the codec would return an error if such a non-valid particle appears. It can be discussed whether the codec needs to do this, but I don't consider this issue valid right now. By the way, it seems you are throwing random stuff at the decoder to find crashes? We should not even have tolerated your header bytes (analyzed in #102, fixed in #103). |
Describe the bug
ISO Version
ISO15118-20
Describe the bug
A malformed EXI document can cause an exception.
To Reproduce
Compile the following harness.
Pass the malformed EXI document over stdin with valgrind.
Anything else?
To Reproduce
Steps above.
Anything else?
No response
The text was updated successfully, but these errors were encountered: