用户要求总结网页截图中的漏洞关键信息,格式为简洁的中文markdown。 需要提取的信息点: 1. **漏洞概述**:从Commit message和标题中提取。 2. **影响范围**:从文件路径和代码上下文推断。 3. **修复方案**:从代码diff中提取。 4. **POC/利用代码**:检查是否有相关代码。 **分析截图内容:** * **标题/Commit Message**: "Bug 760990: Avoid overflow src_stride calculation in unpack_stream. By using 64-bit math." * 这表明这是一个关于整数溢出(overflow)的漏洞,具体发生在 `src_stride` 的计算中。 * 修复方法是使用64位数学运算(64-bit math)。 * **文件路径**: `source/ffz/draw-unpack.c`。这表明影响范围是 `draw-unpack.c` 文件,属于 `ffz` 模块。 * **代码Diff**: * 旧代码(被删除的):`int src_stride = (w * depth * n) >> 1;` * 新代码(新增的): ```c int64_t src_stride = (int64_t)w * depth * n >> 1; // avoid overflow by mapping to 64-bit math int src_stride = (int)src_stride; ``` * 这证实了修复方案是将计算过程提升到64位整数(`int64_t`)以防止溢出,然后再转回32位整数。 * **POC/利用代码**: 截图中没有显示任何POC或Exploit代码,只有修复代码。 **构建总结:** * **漏洞概述**: Bug 760990,在 `unpack_stream` 函数中计算 `src_stride` 时发生整数溢出。 * **影响范围**: `source/ffz/draw-unpack.c` 文件中的 `unpack_stream` 函数。 * **修复方案**: 将 `src_stride` 的计算过程改为使用64位整数(`int64_t`)进行运算,避免32位整数溢出,最后再强制转换回 `int`。 * **代码提取**: 提取修复部分的代码。 **最终检查**: 确保语言是中文,格式是markdown,不包含无关信息。 ### 漏洞关键信息总结 **漏洞概述** * **编号**: Bug 760990 * **描述**: 在 `unpack_stream` 函数中计算 `src_stride` 时发生整数溢出(overflow)。 * **原因**: 原有的计算逻辑 `(w * depth * n) >> 1` 使用32位整数运算,当数值较大时会导致溢出。 **影响范围** * **文件**: `source/ffz/draw-unpack.c` * **函数**: `unpack_stream` **修复方案** * **方法**: 使用64位数学运算(64-bit math)来避免溢出。 * **具体实现**: 将计算过程中的变量类型提升为 `int64_t`,计算完成后再强制转换回 `int`。 **修复代码** ```c int64_t src_stride = (int64_t)w * depth * n >> 1; // avoid overflow by mapping to 64-bit math int src_stride = (int)src_stride; ```