GitHub 安全公告库 (GHSA)·· 22 小时前精选AI 评分70
Pillow 保存 TIFF 到 BytesIO 时 _tiffWriteProc 存在堆溢出,附复现脚本与补丁
Pillow: Heap buffer overflow in _tiffWriteProc when saving TIFF to BytesIO
AI 导读
Pillow 在把 TIFF 保存到 io.BytesIO 等无 fileno() 的目标时,src/libImaging/TiffDecode.c 的 _tiffWriteProc 按 state->size + size 而非写入位置扩容,导致堆缓冲区溢出,同时把未初始化的堆字节写入输出文件。
为什么值得看
报告给出可运行的复现脚本与补丁,说明默认设置下把上传图片另存为 TIFF 到内存对象即可触发越界写。
来源:GitHub 安全公告库 (GHSA) · github.com