Skip to content
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

Break when property offset exceeds stream #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

matthieuxyz
Copy link

When a file is corrupted or from untrusted source (possibly a malware), the number of property can be extremely large and exceed the longer of the stream.

Instead of looping over and over for unparsable properties, we should exit the loop early.

Sample that cause the issue:
https://www.virustotal.com/gui/file/250ff87ba85b2cb7bd04c9e4442eb08f70d5c1d555347c16addaa0d05bda8cb0/detection
https://app.any.run/tasks/f9e1d49a-5eec-4392-97b3-a109a2db8007/

@decalage2 decalage2 self-requested a review March 12, 2020 20:39
@decalage2 decalage2 self-assigned this Mar 12, 2020
@decalage2 decalage2 added the bug label Mar 12, 2020
@decalage2 decalage2 added this to the olefile 0.47 milestone Mar 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants