Skip to content

crypto/tls: panic when processing partial post-handshake message in QUICConn.HandleData #62266

@neild

Description

@neild

Once the TLS handshake completes, QUICConn.HandleData buffers data and passes it to handlePostHandshakeMessage every time the buffer contains a complete message. The size check is wrong, however, so it can pass along a partial message, triggering a panic when handlePostHandshakeMessage tries to read the remainder of the message.

In addition, HandleData doesn't limit the amount of data it can buffer. It should reject messages larger than maxHandshake.

Thanks to @marten-seemann for reporting this issue.

Normally, we'd consider this a PRIVATE track vulnerability, but this is a very new API and the only known user (quic-go) has already released a workaround in a patch release, so we're calling it PUBLIC track.

The panic due to partial messages is CVE-2023-39321.
The lack of a limit on buffered post-handshake data is CVE-2023-39322.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.Security

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions