# OCSP Status Request extension unbounded memory growth (CVE-2016-6304)

OpenSSL leaks memory on each renegotiation carrying a large OCSP Status Request extension, exhausting server memory and causing DoS.

- Payout: hidden
- Severity: high
- Program: Internet Bug Bounty
- Found by: theyarestone
- Disclosed: 2017-04-12
- CVE: CVE-2016-6304
- Write-up quality: 6/10
- Original: https://hackerone.com/reports/216840
- Library page: https://bugbountylibrary.com/r/h1%3A216840
- Tags: area:devices domain:network impact:dos kind:bounty platform:hackerone sev:high technique:source-review vuln:dos

**Target:** TLS server using OpenSSL with OCSP extension parsing
**Root cause:** The OCSP Status Request extension data is allocated per handshake but not freed on renegotiation, so repeated renegotiations with large extensions accumulate memory.
**Steps:**
1. Connect to a TLS server built with default OpenSSL (OCSP enabled).
2. Send a ClientHello with an excessively large OCSP Status Request extension.
3. Trigger renegotiation repeatedly, sending a large OCSP Status Request extension each time.
4. Observe unbounded server memory growth until exhaustion.
**Exploitation:** Attacker repeatedly renegotiates TLS while attaching oversized OCSP Status Request extensions, accumulating unfreed allocations until the server runs out of memory and becomes unavailable.
**Insight:** Per-handshake extension parsing that allocates but doesn't free on renegotiation is a memory-growth DoS vector; test renegotiation paths with large extension payloads even when the feature (OCSP) is unsupported.

