Skip to content

Break when property offset exceeds stream#131

Open
matthieuxyz wants to merge 1 commit intodecalage2:masterfrom
matthieuxyz:master
Open

Break when property offset exceeds stream#131
matthieuxyz wants to merge 1 commit intodecalage2:masterfrom
matthieuxyz:master

Conversation

@matthieuxyz
Copy link
Copy Markdown

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