Memory exhaustion via crafted zip file
未關閉
還沒有人認領這個 Issue。
3.10
3.11
3.12
3.13
3.14
3.15
3.16
stdlib
type-security
- 主要語言
- Python
- 星號
- 77.2k
- 分支
- 35.9k
- PR 合併指標
- PR 指標待擷取
描述
As reported by @tonghuaroot:
zipfile.ZipExtFile._read1() bounds the output of each decompress() call for DEFLATE members (it passes a max_length to zlib), but for bzip2 / LZMA / Zstandard members it called self._decompressor.decompress(data) with no bound. A whole compressed chunk was therefore expanded into a single allocation before the data = data[:self._left] clip ran.
Linked PRs
- gh-156003
- gh-156362
- gh-156737
- gh-156738
- gh-156739
- gh-156740
- gh-156741
- gh-157180
- gh-157268
- gh-157557
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從 zipfile.ZipExtFile._read1() 開始,將其對 DEFLATE 的處理與 bzip2、LZMA 和 Zstandard 路徑進行比較。確認在截斷剩餘資料之前,展開後的輸出已受到限制,然後為特製的成員新增回歸測試覆蓋,並核查相關的 PR,以避免重複工作。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- python
- 領域
- security
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 20/100