8000 Potential Integer Overflow vulnerability in upnphttp.c · Issue #24 · azatoth/minidlna · GitHub
[go: up one dir, main page]

Skip to content

Potential Integer Overflow vulnerability in upnphttp.c #24

Open

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      0