-
Notifications
You must be signed in to change notification settings - Fork 479
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
[SECURITY] out-of-bound in commandoption.c #868
Comments
Could you assign this to me? Thanks. |
Taked a quick look.
It should not be possible because if
We have isalpha(key[2]) check |
I am going to bed. @apocelipes you may check it in detail if you like |
I decoded the data, and found a 'Ó' (\xd3, 211). Checking the alpha to see if it is an English alphabet can fix this issue. Also, GCC docs said "Each kind of machine has a default for what char should be. It is either like unsigned char by default or like signed char by default", so a char in some machines can hold >= 128 values. In fact, Android-arm use the unsigned char by default. |
I'll send a PR to fix this issue. |
So that |
Summary
While fuzzing
fastfetch
(4175dfd) it was found that the application suffers from out-of-bound due to lack of input validation, allowing application to crash via a crafted configuration files leading to denial or service or code execution.ASAN
Code Snippet
https://github.com/fastfetch-cli/fastfetch/blob/dev/src/common/commandoption.c#L16
This issue was caused due to the
toupper(key[2]) - 'A'
expression, which lead to out-of-bounds in theffModuleInfos
array if key is shorter than 3 characters orkey[2]
is not a valid alphabetic character.Proof-of-concept: oob.zip
The text was updated successfully, but these errors were encountered: