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 possible segfault in collection_unpack #3099

Merged
merged 2 commits into from
Mar 3, 2024

Conversation

twouters
Copy link

@twouters twouters commented Mar 1, 2024

When var->value_len somehow becomes 0, we risk wrapping around to 4294967295 due to it being an unsigned int.

Fixes #3082

@airween airween added the 2.x Related to ModSecurity version 2.x label Mar 1, 2024
@marcstern
Copy link
Contributor

@TWouter, can you do the same check for var->name_len ?

When var->value_len somehow becomes 0, we risk wrapping around to 4294967295 due
to it being an unsigned int.

Fixes owasp-modsecurity#3082
@twouters
Copy link
Author

twouters commented Mar 1, 2024

done, missed that part of your comment on the issue.

marcstern
marcstern previously approved these changes Mar 3, 2024
Copy link

sonarcloud bot commented Mar 3, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@marcstern marcstern requested a review from airween March 3, 2024 15:23
Copy link
Member

@airween airween left a comment

Choose a reason for hiding this comment

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

LGTM

@airween airween merged commit 788c36d into owasp-modsecurity:v2/master Mar 3, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Related to ModSecurity version 2.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants