-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Crash on illegal characters #48
Comments
@retikulum I have fixed the issue by revamping the implementation of The case https://controlc.com/74f1e9b9 can pass on my local. Can you please revisit this issue when you're free? Also, I think introducing fuzzy testing into this project is definitely a must-do. I have added it to the roadmap. |
@soasme Thanks for your great effort. I have tested both cases. "Hello Worìd" works perfectly on my machine however the second case it is still failing. I think I shouldn't have copy-pasted test case on controlc because it generally brokes for non-ascii. I have tested second case both with sanitizers and without sanitizers. It again crashes. My crash_test case is attached. For the introducing fuzzing test into project, you can consider integrating it with oss-fuzz (I know that it can take time to integrate it for small projects) or you can use similar script that I use for this campaign. It is inspired by afl++ installation script. I haven't tested it, I just wrote it for giving brief explanation to you.
|
Thanks for the procedure. I'll take it a look. The exact character that caused the problem is |
@soasme Hi again. This will help me a lot to gain better understanding of how these encoding schemes work. You can close the issue as you wish. Thank you for your time and effort. |
Hi,
While I was fuzzing library, I encountered some bugs. You can find them in below.
What is my program?
Ubuntu Version
Bug
Some special characters can't be parsed and it caused memory (heap-bufffer-overflow) errors.
You can produce it with string "Hello Worìd" (ì = 0xEC or 236). I patched P4_CaseCmpInsensitive function to show what is the value of P4_String given to P4_ReadRune as an argument. It can be seen that it is stopped after ì because it is parsing variable wrong and assign wrong number to P4_Rune* c . With the use of wrong value, program will access memory areas where it shouldn’t be. I am aware of open issue (#38) for supporting other utf encodings.
If input is a long string which contains “illegal” characters, program will be aboreted and throws DEADLYSIGNAL. This bug can be produced without sanitizers. Inpus can be found here: https://controlc.com/74f1e9b9
AFL++ (https://github.com/AFLplusplus/AFLplusplus) is used for this fuzzing campaign.
The text was updated successfully, but these errors were encountered: