Skip to content

Cap Stream receive buffer so incomplete frames cannot grow until OOM #8

Description

@enochgroot

lib/msgpack.js concatenates self.buf on every data with allocUnsafe(self.buf.length + d.length) and no max. Incomplete frames (kScanContinue) keep the buffer. SEND_QUEUE_CAP bounds send, not receive. close/end/error do not clear self.buf.

Oversized headers already throw and drop the buffer. Incomplete frames under ScanOne still grow.

Reject (and reset the socket) when self.buf.length + d.length would exceed a documented MAX_STREAM_BYTES before allocate.

Activity

  1. enochgroot commented on Sep 21, 2026

    @enochgroot
    OwnerAuthor

    Implemented in #14 (branch fix/review-open-6-13).

  2. enochgroot commented on Sep 22, 2026

    @enochgroot
    OwnerAuthor

    Tracked upstream: msgpack#25698

    Closing this fork issue as a duplicate of that ticket. Numbering on enochgroot/msgpack-node is a different sequence from msgpack/msgpack-node.

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