The allocation leak in Tomcat's HTTP/2 backlog tracking is a resource management flaw that operates silently, making it distinct from request-flood denial-of-service patterns that most monitoring catches. The bug occurs when stream resets intersect with new stream initialization in ways that fail to reverse the backlog accounting. Under normal HTTP/2 operation, a client opens a stream, the server registers it against its concurrency limit, data flows, and cleanup properly decrements the count. But when a stream resets mid-lifecycle—before registration completes or while other streams are initializing within the same connection—the cleanup step is skipped or applied incorrectly. Each adversarial reset leaves a backlog slot permanently occupied in Tomcat's internal state, and the memory associated with that stream never returns to the pool.

What makes this architecturally dangerous is HTTP/2's multiplexed model. A single TCP connection can carry dozens of concurrent streams, and a hostile client doesn't need high-volume requests to cause problems. It只需要持续打开新stream并在每个stream初始化期间发送reset信号,就能以每个连接少量泄漏的速度积累。在长时间运行的服务器上,这种泄漏会逐渐侵蚀可用内存,同时悄悄降低服务器认为它拥有的可用并发槽位数量。当内存最终耗尽时,症状不会是请求泛洪警报——而是渐进的服务降级、GC暂停增加,最终OOM杀死进程或容器。

对于运营团队,优先级是监控而非仅仅打补丁。首先,在Tomcat 9.0.121 / 10.1.15 / 11.0.5及更高版本中验证HTTP/2连接池的内存使用趋势是否异常。检查JVM堆增长是否与活跃HTTP/2连接数不成比例,以及GC日志中是否出现越来越长的暂停。其次,由于8.5.x已EOL且无补丁路径,运行该版本的组织需要决定是否禁用HTTP/2或接受此漏洞的持续风险。第三,对于高流量部署,考虑在服务网格层实施连接耗尽限制,假设Tomcat的并发计数可能存在偏差。

这种方法揭示了一个更广泛的模式:在成熟协议实现中,资源管理缺陷往往出现在stream重置等非happy path场景中,而标准测试通常不会触发这些场景。