Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tls: fix out-of-bounds read in ClientHelloParser #44580

Merged
merged 1 commit into from Sep 15, 2022

Commits on Sep 14, 2022

  1. tls: fix out-of-bounds read in ClientHelloParser

    ClientHelloParser::ParseHeader(data, avail) potentially accesses data
    beyond avail bytes because it trusts the client to transmit a valid
    frame length. Sending an impossibly small frame length causes the TLS
    server to read beyond the buffer provided by the caller.
    
    Guard against this by calling End() on the ClientHelloParser when the
    client transmits an impossibly small frame length.
    
    The test is designed to reliable cause a segmentation fault on Linux and
    Windows when the buffer overrun occurs, and to trigger a spatial safety
    violation when compiled with an address sanitizer enabled or when
    running under valgrind.
    tniessen committed Sep 14, 2022
    Copy the full SHA
    202ccc3 View commit details
    Browse the repository at this point in the history