-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
Stack Buffer Overflow in _lou_translate when processing formatting options #1726
Comments
I used your code and your input but I do not get a log from ASAN. But I can imagine what the problem is: If you pass some input and a typeform that is smaller than the input then the following loop will cause a memory overflow: for (k = 0; k < input.length; k++) {
typebuf[k] = typeform[k];
if (typebuf[k] & EMPHASIS) haveEmphasis = 1;
} It just copies the At the moment I do not know how to solve this, as through the API we get a pointer to the input, a pointer to the typeform and a length of the input. @bertfrees @shuangxiangkan Any ideas? |
I'm tempted to mark this as wontfix. @shuangxiangkan what you have discovered is that you can shoot yourself in the foot if you lie to the API, i.e. you tell it that the buffer is of length I do not think this is really a security concern, as the |
I added some comments to the API to the effect that the behavior is undefined if you pass in a |
Description
While fuzzing liblouis with AFL++, I discovered a heap buffer overflow vulnerability when parsing small input file
Environment
Reproduction
ASAN Log
Fuzz file and input
input.zip
fuzz_translate_generic_afl.c.zip
The text was updated successfully, but these errors were encountered: