-
-
Notifications
You must be signed in to change notification settings - Fork 990
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Denial of Service in BinaryDict.cpp #303
Comments
Prove it like this. ./opencc_dict -i POCs -o temp.txt -f ocd -t text |
Sorry, I tried to fix the security issue, but not so familiar with the code. Just post the draft patch, feel free to comment it. |
Thanks for reply. The patch looks good! |
Was the patch merged with a branch? If so, can you link to the fixing commit? Thanks! |
Maybe @epico can merge the patch. |
Created pull request #309 |
Sorry, I don't have write access to this repository. Please help merge the patch! |
Hi, I am a security fan. And I found an out of bound pointer in BinaryDict.cpp which could lead to segment fault (Denial of Service if some applications use this library). In BinaryDict::NewFromFile, there are two offset which are keyOffset and valueOffset. So if I provide a .ocd file that I can control these two offsets, I can actually make it really big. So the pointers(const char* key and const char* value) will point to unreadable place. I've attached the POCs for these two pointers. Hope you can respond soon :)
POCs.zip
The text was updated successfully, but these errors were encountered: