Overview
| Artifact ID: | 87b1bb42e9d01c6987bb42d96ca3e354abbaac037e8601344a9db4e7b55a2268 |
|---|---|
| Ticket: | 9563b8eeeca59ca891df8406c80ae71ae6a73b57
Possible zlib compression bomb vulnerabilities |
| User & Date: | dkf on 2026-06-21 19:05:03 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/x-markdown"
- comment changed to:
Had an AI report [this PR](https://github.com/tcltk/tcl/pull/41) on Github. Patch is totally unusable, but principle is something we should audit for. ## Description (from PR) > The ZlibTransformInput function processes compressed data from a channel without enforcing limits on total decompressed output size. A small compressed payload (zip bomb) can expand to gigabytes of data, exhausting system memory. The function continues to inflate data as long as the caller requests more bytes, with no built-in protection against excessive expansion ratios. > Exploitation scenario: An attacker sends a crafted compressed payload (e.g., a 1KB gzip stream that decompresses to 1GB) through a Tcl channel configured with zlib decompression (e.g., via 'zlib push decompress $chan'). ## Proposed Fix (from PR) At line 3313, add this (in `ZlibTransformInput`, shortly after call to `ResultDecompress`): > ``` > /* > * Guard against decompression bombs: if total decompressed output > * exceeds 1 GiB, return an error to prevent memory exhaustion. > */ > if (chanDataPtr->inStream.total_out > (1024UL*1024UL*1024UL)) { > *errorCodePtr = EFBIG; > return -1; > } > ``` - foundin changed to: "8.6"
- is_private changed to: "0"
- login: "dkf"
- priority changed to: "5 Medium"
- private_contact changed to: "f6b536f9c1ed4b589e96e38fb613afc3d8991783"
- resolution changed to: "None"
- severity changed to: "Severe"
- status changed to: "Open"
- submitter changed to: "dkf"
- subsystem changed to: "57. zlib"
- title changed to: "Possible zlib compression bomb vulnerabilities"
- type changed to: "Bug"