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

Potential Integer Overflow vulnerability in upnphttp.c #24

Open
KSB21ST opened this issue Aug 18, 2021 · 0 comments
Open

Potential Integer Overflow vulnerability in upnphttp.c #24

KSB21ST opened this issue Aug 18, 2021 · 0 comments

Comments

@KSB21ST
Copy link

KSB21ST commented Aug 18, 2021

Hi,
It seems that there exists a potential integer overflow. Please find the following description:

  1. n can be an arbitrary large number

    n = recv(h->socket, buf, 2048, 0);

  2. h->req_buflen is added to n

    h->req_buflen += n;

  3. Process_upnphttp(...) is called again

    Process_upnphttp(e);

  4. Call to realloc with the large integer can cause a memory allocation with an overflowed size

    h->req_buf = (char *)realloc(h->req_buf, n + h->req_buflen);

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

No branches or pull requests

1 participant