Skip to content

[rpc] RPC decoder allocates before validating field length #3757

Description

@fresh-borzoni

Search before asking

  • I searched in the issues and found nothing similar.

Description

The generated protobuf field decoders read a length-delimited field's length prefix and allocate for it before checking that many bytes are actually present.

So a small request with a large length prefix makes the server allocate a big array on the Netty event-loop
thread before it reads.

Willingness to contribute

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions