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