← 返回日报
精读 预计 2 分钟

OpenSSL HollowByte: A DoS Hiding in 11 Bytes

摘要

文章描述 Okta Red Team 发现的 HollowByte 漏洞:TLS ClientHello 的 4 字节握手头声明长度后,旧版 OpenSSL 在未验证数据前即调用 malloc 分配最多 131KB 缓冲区,工作线程阻塞等待;连接断开后 glibc 不立即归还内存,多次随机大小攻击导致堆碎片化,RSS 持续上升,仅重启进程可恢复。测试显示 1GB 环境 OOM 于 547MB,16GB 环境锁定 25% 内存;漏洞影响 Apache、NGINX、Node.js、Python 等使用 OpenSSL 的组件。修复为增量缓冲增长,已合并至 OpenSSL 4.0.1 并回端口 3.6.3 等版本,建议立即升级发行版包。

荐读理由

你现在知道 OpenSSL 早期版本存在 11 字节 payload 触发未验证预分配加 glibc 碎片的真实 DoS,影响 NGINX Node.js 等系统,升级到 3.0.21+ 就能避免永久内存膨胀

原文

‹ Back to blog

July 16, 2026

OpenSSL HollowByte: A DoS Hiding in 11 Bytes

Okta Red Team

Every so often, a vulnerability reminds us how deeply our digital infrastructure relies on foundational libraries. Recently, the Okta Red Team discovered HollowByte, a Denial of Service (DoS) vulnerability in OpenSSL. By sending a malicious payload of just 11 bytes, a remote, unauthenticated attacker can force a server to allocate disproportionate chunks of memory before any security handshake even begins.

Here is the breakdown of how it works.

Trusting the Header

The TLS handshake begins with a ClientHello message wrapped in a record. Each handshake message carries a 4-byte header that declares how large the incoming message body will be.

Older versions of OpenSSL allocate a receive buffer based on that attacker-declared length before any data has actually arrived.

When a rogue header lands, the state machine triggers an unvalidated allocation. When the malicious 11-byte payload arrives, the TLS state machine reads the 4-byte handshake header and triggers an unvalidated pre-allocation based on the header's 3-byte length declaration:

Read Header⟶grow_init_buf()⟶OPENSSL_clear_realloc()⟶malloc(attacker_size)

Because there is no payload validation at this early stage, malloc() allocates up to 131 KB based solely on the untrusted packet's claims. The worker thread then blocks, waiting indefinitely for data that will never arrive.

Permanent Memory Fragmentation

Holding connections open to exhaust threads is a classic trick (like Slowloris). HollowByte introduces a nastier compounding effect due to how the GNU C Library (glibc) handles memory.

When an attacking connection drops, OpenSSL frees the buffer. However, glibc does not immediately return small-to-medium allocations to the operating system; it keeps them for potential reuse.

By launching waves of connections with randomized claimed sizes, an attacker prevents the allocator from reusing those freed chunks. The heap fragments heavily, causing the server’s Resident Set Size (RSS) to climb continuously.

Even after the attacker disconnects, the server remains permanently bloated. The only way to reclaim that memory is to terminate the process.

Real-World Testing & Ecosystem Impact

To measure the threat, we tested unpatched and patched OpenSSL instances running NGINX under various load conditions.

In a standard 1 GB RAM environment, the unpatched server was OOM-killed at 547 MB of frozen, fragmented memory. In higher-spec testing (16 GB RAM), the attack successfully locked up 25% of the system's total memory while staying safely under the connection ceiling, meaning standard connection-limiting defenses won't stop it.

Because OpenSSL is widely used and embedded, this vulnerability affects a variety of software, including web servers (Apache, NGINX), language runtimes (Node.js, Python, Ruby, PHP), and databases (MySQL, PostgreSQL).

The Fix and Next Steps

The OpenSSL team resolved this by moving to incremental buffer growth (merged in PRs #30792, #30793, and #30794). This fix was silently included as part of the OpenSSL v4.0.1 release, with silent backports to release versions 3.6.3, 3.5.7, 3.4.6, and 3.0.21. Instead of trusting the header outright, OpenSSL now grows the buffer only as bytes actually land on the wire. A claim with no follow-through now costs the server nothing.

While OpenSSL handled this as a hardening fix rather than a CVE security advisory, we recommend upgrading your distribution's OpenSSL packages immediately.

Okta Red Team

Lobsters · 1 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?