Skip to content

Potential Integer Overflow vulnerability in upnphttp.c #24

@KSB21ST

Description

@KSB21ST

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);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions