Skip to content

a risk of memory exhaustion #199

Description

@ifoxhz

"In infinistore.cpp, within the on_read function, I’ve reviewed the context but haven't found any validation for body_size. Is there a risk of memory exhaustion from specially crafted malicious packets? I haven't had enough time to audit the entire codebase."

// prepare for reading body
client->expected_bytes_ = client->header_.body_size;
client->bytes_read_ = 0;
client->tcp_recv_buffer_ =
(char *)realloc(client->tcp_recv_buffer_, client->expected_bytes_);
client->state_ = READ_BODY;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions