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

Clam 2214 bounds checking regex suffix #807

Merged

Conversation

ragusaa
Copy link
Contributor

@ragusaa ragusaa commented Jan 6, 2023

No description provided.

@ragusaa ragusaa force-pushed the CLAM-2214-BoundsCheckingRegexSuffix branch from e2c9dc8 to 000816e Compare January 6, 2023 21:41
@net1
Copy link

net1 commented Jan 7, 2023

I wonders if this PR also fix regex in Yara too?

@ragusaa
Copy link
Contributor Author

ragusaa commented Jan 19, 2023

I wonders if this PR also fix regex in Yara too?

I am sorry, I must have missed your comment. Do you happen to have a testcase I can try with this PR?

@net1
Copy link

net1 commented Jan 20, 2023

It is back-references regex and I just found that back-references are not support in Yara rules.

@ragusaa ragusaa force-pushed the CLAM-2214-BoundsCheckingRegexSuffix branch from 50f63cf to 75ac275 Compare January 20, 2023 17:16
Copy link
Contributor

@val-ms val-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing went well.
Outside of the above, looks good to me.

libclamav/regex_suffix.c Outdated Show resolved Hide resolved
libclamav/regex_suffix.c Outdated Show resolved Hide resolved
libclamav/regex_suffix.c Outdated Show resolved Hide resolved
While searching for the end of the character class ']', there was no
bounds checking to prevent reading past the end of the regular
expression.  This PR corrects that.
@ragusaa ragusaa force-pushed the CLAM-2214-BoundsCheckingRegexSuffix branch from 75ac275 to a5ee4c9 Compare February 1, 2023 22:53
@val-ms val-ms merged commit d9a0f6a into Cisco-Talos:main Feb 3, 2023
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.

3 participants