关键信息总结 漏洞概述 漏洞类型: Null Pointer Dereference 受影响组件: LRZIP 发现时间: 两周前 技术细节 受影响函数: __GI___strtol_l_internal 源文件: strtol_l.c 行号: 291 信号: SIGSEGV (11) 内存访问: 从空地址 (0x000000000000) 读取 崩溃位置: main.c:440 (strtol 函数调用) 机制和根本原因 根本原因: 在 lrzip 的主函数中,由于输入验证不足导致的空指针解引用。 具体步骤: 1. 参数处理: lrzip 在 main.c 中处理参数。 2. 参数解析: 在第 440 行,代码尝试将字符串参数转换为整数使用 strtol。 3. 空指针传递: 将空字符串参数传递给 strtol。 4. 库函数调用: strtol 内部调用 __GI___strtol_l_internal 在 strtol_l.c:291。 5. 空指针解引用: 尝试从地址 0x000000000000 读取,导致 SIGSEGV。 地址sanitizer报告 关键信息: SEGV on unknown address 0x000000000000 (pc 0x7fdd71491c580 by 0x7ffd2cc70be0 s =3761838=EERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fdd71491c580 by 0x7ffd2cc70be0 s =3761838=EERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 by a NULL pointer dereference. 概念证明 触发方式: 使用提供的恶意输入文件 POC_lrzip_null_dereference。 复现步骤 1. 使用 AddressSanitizer 编译 lrzip。 2. 执行 。 3. 程序将以空指针解引用崩溃。 受影响版本 LRZIP 版本 0.6.5+ (commit 1242aec) 和最新 master 版本。 致谢 Xudong Cao (UCAS) Yuqing Zhang (UCAS, Zhongguancun Laboratory)