Skip to content

Fix UAF in ngx_http_uploadprogress_event_handler #63

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

Merged
merged 1 commit into from
Mar 12, 2025

Conversation

BenBE
Copy link
Contributor

@BenBE BenBE commented Mar 12, 2025

This UAF can be reached when compiling with --with-debug.

Fixes #61

This UAF can be reached when compiling with --with-debug.

Fixes masterzen#61
Copy link
Owner

@masterzen masterzen left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@masterzen masterzen merged commit 463d60b into masterzen:master Mar 12, 2025
@BenBE
Copy link
Contributor Author

BenBE commented Mar 12, 2025

Thx for merging so quickly.

I had someone else (@martok) also take a look at this patch, and this seems to have been the only occurence of this in the file.

That ssid, I'd suggest to do a release with this fix, as this UAF could leak arbitrary information to logfiles, if the freed memory gets re-assigned/allocated between the free and the log output (race condition) by another thread. The chance for this is small, but depending on the information this may contain about anything that nginx has access to (security impact). The risk here is low, given this only affects debug builds AND has some races involved.

@masterzen
Copy link
Owner

Thx for merging so quickly.

I had someone else (@martok) also take a look at this patch, and this seems to have been the only occurence of this in the file.

That ssid, I'd suggest to do a release with this fix, as this UAF could leak arbitrary information to logfiles, if the freed memory gets re-assigned/allocated between the free and the log output (race condition) by another thread. The chance for this is small, but depending on the information this may contain about anything that nginx has access to (security impact). The risk here is low, given this only affects debug builds AND has some races involved.

I've just released a new version v0.9.4 with the fix.
Thanks for your help :)

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.

nginx_upload_progress release 0.9.3 won't compile with nginx-1.27.0 and --with-debug option
2 participants