Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
CVE-2026-36834 — 可复现的 CVE-2026-36834 概念验证,演示 LibRaw 的 Panasonic RW2 解码器中的越界数组读取,附带变异脚本和基于消毒器的崩溃复现。 | Kitploit
工具/GitHubGitHub/kpatsakis/cve-2026-36834
内存取证漏洞分析模糊测试二进制分析论文与研究学习与教育
GitHubkpatsakis/cve-2026-36834

CVE-2026-36834

可复现的 CVE-2026-36834 概念验证,演示 LibRaw 的 Panasonic RW2 解码器中的越界数组读取,附带变异脚本和基于消毒器的崩溃复现。

查看仓库
32个月前尚未审核

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

摘要

在 src/decoders/pana8.cpp 中存在数组越界读取。当未找到 Huffman 表匹配时,函数 GetDBit() 可能返回值 17,但 huff_coeff[] 仅声明了 17 个元素(有效索引为 0-16)。这会导致访问 huff_coeff[17],触发未定义行为,已通过 UBSan 和 AddressSanitizer 确认。

影响

处理用户提供的 RW2 文件的应用程序(例如使用 LibRaw 的图像编辑器或照片管理工具)在打开恶意文件时,可能会崩溃或泄露进程内存。

CWE: CWE-125(越界读取),CWE-129(数组索引验证不当) CVSS v3.1: AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:H(约 6.5 中危)

Git 提交: 777f20ae21c611a78021bd051fbbf1e71eae78f2

受影响的代码

文件:src/decoders/pana8.cpp 函数:pana8_param_t::DecodeC8()

根本原因出在 GetDBit():

root@kitploit:~
  uint32_t pana8_param_t::GetDBit(uint64_t a2)
  {
      for (int i = 0; i < 16; i++)
          if ((a2 & hufftable2[i]) == hufftable1[i])
              return i;
      return uint32_t((hufftable2[16] & a2) == hufftable1[16]) ^ 0x11u;
      // When comparison is false: returns 0 ^ 17 = 17
  }

返回值随后被直接用作数组索引,且没有任何边界检查:

root@kitploit:~
  huff_index = int(GetDBit(pixbits));          // can be 17
  int32_t v37 = (huff_coeff[huff_index] >> 24) // line 250: OOB
  uint32_t hc = huff_coeff[huff_index];        // line 251: OOB
  // ... and lines 254, 273

已确认的调用链(UBSan 输出) LibRaw::unpack() -> panasonicC8_load_raw() pana8.cpp:125 -> pana8_decode_loop() pana8.cpp:132 -> pana8_decode_strip() pana8.cpp:155 -> DecodeC8() pana8.cpp:250 <-- OOB triggered

触发的 UBSan 错误: pana8.cpp:250 index 17 out of bounds for type 'unsigned int [17]' pana8.cpp:251 index 17 out of bounds for type 'unsigned int [17]' pana8.cpp:254 index 17 out of bounds for type 'unsigned int [17]' pana8.cpp:254 shift exponent -17 is negative pana8.cpp:273 index 17 out of bounds for type 'unsigned int [17]' pana8.cpp:303 left shift of negative value -1

复现

使用 sanitizers 构建 LibRaw:

root@kitploit:~
  ./configure CXXFLAGS="-fsanitize=address,undefined -g -O1" \
            LDFLAGS="-fsanitize=address,undefined"
  make -j$(nproc)

对任意 Panasonic RW2 文件运行变异器脚本:

root@kitploit:~
  python3 mutate_rw2.py input.rw2 mutated_pana8.rw2
  ASAN_OPTIONS=halt_on_error=0:print_stats=1 ./bin/dcraw_emu -v mutated_pana8.rw2

补丁

https://github.com/LibRaw/LibRaw/commit/02da167e0f819a37dbb7d714e87c5b40df6c5917

下载工具