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

Fix a heap overrun in the dotnet module. #1108

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

plusvic
Copy link
Member

@plusvic plusvic commented Aug 9, 2019

A heap overrun can occur in call to set_sized_string when called with blob_offset and blob_result.length values that are not validated to be within the boundaries of the buffer containing the PE file. The validation was being done before adding blob_result.length to blob_offset.

Credit to OSS-Fuzz for finding this bug.

A heap overrun can occur in call to set_sized_string when called with blob_offset and blob_result.length values that are not validated to be within the boundaries of the buffer containing the PE file. The validation was being done before adding blob_result.length to blob_offset.

Credit to OSS-Fuzz for finding this bug.
@plusvic plusvic requested a review from wxsBSD August 9, 2019 09:15
@plusvic
Copy link
Member Author

plusvic commented Aug 9, 2019

BTW, I miss some test cases for the dotnet module. At least a few tests covering the most important features would be nice. Making changes in this module without the safety net of test cases can lead to regression bugs.

@wxsBSD
Copy link
Collaborator

wxsBSD commented Aug 9, 2019

I'll get some test cases for this module up as soon as I can (hopefully within a week).

@plusvic plusvic merged commit 7a5a2b6 into master Aug 9, 2019
@plusvic plusvic deleted the fix-heap-overflow-in-dotnet branch August 12, 2019 07:08
tarterp pushed a commit to mandiant/yara that referenced this pull request Mar 31, 2022
A heap overrun can occur in call to set_sized_string when called with blob_offset and blob_result.length values that are not validated to be within the boundaries of the buffer containing the PE file. The validation was being done before adding blob_result.length to blob_offset.

Credit to OSS-Fuzz for finding this bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants