-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Potential DOS of Mobile Applications because of no null check in ImageRequest.java [bug] #2540
Comments
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions. |
Thanks for the bug report. Pull requests are welcome! |
Hey! Looking at this, you mention that the issue is in line 361 of ImageRequest, which seems to be an empty line https://github.com/facebook/fresco/blob/master/imagepipeline/src/main/java/com/facebook/imagepipeline/request/ImageRequest.java#L361 I'm also not sure what the exact NPE is, do you have a stack trace? I'm not familiar with the |
Hi @oprisnik, YES! you are correct, sorry. I have updated the description and changed the line number to 381. Documentation on GetSize. The RN functionality for Image.getSize just calls into the Fresco library. The relevant code in React Native is here. Hence I thought the issue could be fixed here in Fresco deeper down. Please let me know your thoughts. |
Hey @oprisnik. any feedback? is this a RN issue and should I post this issue there? or can it be fixed here? |
Hi @oprisnik, any feedback? |
Hey! Sorry, I did not have the time to look into this. However both line 361 and 381 that you have linked to are empty lines and there's no mention of |
Hi @oprisnik The below (file:) crashes with the stack trace:
however file:// does not cause a crash Like a said I am not a React developer. |
Do you have more stack trace lines? |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug" or "enhancement" and I will leave it open. Thank you for your contributions. |
#2501 # Description
I have encountered multiple android applications that crash and sometimes become unusable (Denial of Service) for the user, when the application accepts markdown. to trigger this exploit a malicious user would send command
![Picture Title](file://127.0.0.1/doesnotexist.jpg)
to a user in a chat. When the message gets rendered on the users phone the application cashes for and sometimes continues to crash until the exploit is removed. In some applications that allows chats, the chat might open after reopening the application cause a Denial of Service on the valid user. Sometimes it is not possible to remove the malicious markdown. I believe the code south be validated and check for anull
value and caught if found.Reproduction
on line 393 of ImageRequest.java there is a missing null check. By utilizing the below code, the application crashes with the below error.
Therefore if an application passes user-supplied data to the
getSize()
method an error will be thrown.snack.expo.io source code
The
getSize
method is not the only part affected. If any React Native call that invokescom.facebook.impagepipeline.request ImageRequest
Solution
Implement a null check here
Additional Information
The text was updated successfully, but these errors were encountered: