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

httpd: add two signedness check in httpd/http.c #857

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

LinRaymond2006
Copy link

Two signedness checks are added to wget() function in httpd/http.c.
Without the checks, a wget request from the implementation to a malicious server with a crafted Content-Length parameter (or a valid Content-Length plus a crafted Transfer-Encoding: chunked) may lead to a consequent buffer over-read in the statement len = fread(buf, 1, len, fp);.

@RMerl
Copy link
Owner

RMerl commented Jul 25, 2024

Thanks. I'll merge it just to be safe, but do note that this function isn't used by the firmware (it's probably legacy code), so the router was never vulnerable to it.

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.

2 participants