针对 CVE-2026-27280 的深度安全研究、根本原因分析和实用 Android 测试实验室——这是一个严重的 坐标空间不匹配 漏洞,会导致 Adobe DNG 软件开发工具包(SDK) 中出现 越界(OOB)写入。
| 属性 | 详情 |
|---|---|
| CVE ID | CVE-2026-27280 |
| CWE ID | CWE-787: Out-of-bounds Write |
| 受影响组件 | Adobe DNG SDK (C++),dng_render.cpp 中的 dng_render_task::ProcessArea() 函数 |
| 受影响版本 | Adobe DNG SDK $\le$ 1.7.1 build 2471(AOSP revision 1a6d7ea147...) |
| 已修复版本 | Adobe DNG SDK 1.7.1 build 2502(AOSP revision 52ff589c0c...) |
| Adobe 公告 | 2026年3月10日 — Adobe Security Bulletin APSB26-30 |
| CVSS v3.1 评分 | 7.8 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H) |
| Android Security Bulletin | 2026年9月:EoP Critical,Bug ID:A-491543354(影响 Android 14、15、16、16-QPR2) |
| 发现研究者 | Brendon Tiszka 和 Mateusz Jurczyk — Google Project Zero |
Adobe DNG(Digital Negative)是一种基于 TIFF/IFD 结构的开放标准 RAW 图像容器格式。在 Android 操作系统中,libdng_sdk.so 被内置在系统层(/system/lib64/),用于解码 DNG 文件,为相机应用、图库以及系统媒体处理服务提供支持。
Stage3Image。fRowStep = width * channels。mask,32 位浮点数,范围从 0.0 到 1.0)应用局部颜色转换表。每个像素将按相应权重进行颜色插值。DefaultCropOrigin、DefaultCropSize):允许定义相对于传感器有效区域(ActiveArea)的有效裁剪图像区域。当通过 dng_render::Render() 解码并渲染图像 tile 时,执行流会转至 dng_render_task::ProcessArea() 任务:
srcBuffer(包含源图像数据)和 dstBuffer(包含渲染结果)。Masked RGB Tables 元数据,该函数会在进行颜色转换之前为整个 tile 准备相应的掩码。tempMaskBuffer,用于存储该 tile 的临时掩码数据。dng_pixel_buffer::DirtyPixel() 函数具有如下内存区域指针计算公式:
$$\text{Ptr} = \text{fData} + (\text{row} - \text{fArea.t}) \times \text{fRowStep} + (\text{col} - \text{fArea.l}) \times \text{fColStep} + \text{plane} \times \text{fPlaneStep}$$
其中:
fData:已分配内存区域的起始指针。fArea:缓冲区的限定矩形(fArea.t = top,fArea.l = left)。在 tempMaskBuffer 中,fArea 按 srcArea 设置。row、col:调用方想要访问的像素坐标。🔴 漏洞发生于此(坐标空间不匹配): 在 build 2471 的带掩码 RGB 表预处理分支中,源代码将
dstArea的坐标传入了DirtyPixel()函数,而非srcArea:// 错误源代码(SDK <= 2471): uint32 *dPtr = tempMaskBuffer.DirtyPixel(dstArea.t, dstArea.l, dstMaskPlane);
srcArea 与 dstArea 相同)srcArea = (0, 0, 259, 256)dstArea = (0, 0, 259, 256)DirtyPixel(0, 0, 0) 时:
$$\text{offset} = (0 - 0) \times 256 + (0 - 0) \times 1 = 0 \implies \text{Ptr} = \text{fData}$$DefaultCropOrigin = (8, 8))srcArea):从 $(8, 8)$ 开始到 $(259, 256)$ $\implies$ 尺寸 $251 \times 248$。dstArea):从 $(0, 0)$ 开始到 $(251, 248)$。tempMaskBuffer 使用 fArea = srcArea 初始化 $\implies \text{fArea.t} = 8, \text{fArea.l} = 8$。fRowStep = 248,fColStep = 1。DirtyPixel(dstArea.t, dstArea.l, 0) 且 dstArea.t = 0、dstArea.l = 0 时:
$$\text{offset} = (0 - 8) \times 248 + (0 - 8) \times 1 = -8 \times 248 - 8 = -1984 - 8 = -1992 \text{ 个元素}$$float 类型(4 字节)或 uint32:
$$\Delta_{\text{bytes}} = -1992 \times 4 = \mathbf{-7.968 \text{ 字节}}$$ Vùng nhớ cấp phát cho tempMaskBuffer
[ fData ]
|
<----------------------------------+------------------------->
VÙNG NHỚ TRƯỚC BUFFER | VÙNG NHỚ BUFFER HỢP LỆ
[ GHI ĐÈ BỘ ĐỆM - OOB WRITE ] |
^ |
| |
dPtr = fData - 7,968 bytes +------------------------->
当循环执行数据写入时:
dPtr[j] = bgWeight; // Ghi đè vào vùng nhớ trước fData (Underflow / OOB Write)!
由于指针回退到已分配内存区域之前,写操作 dPtr[j] = bgWeight 将覆盖相邻的堆内存块或分配器(Scudo Allocator)的元数据结构,导致崩溃(SIGSEGV)或堆损坏。
Google/Adobe 已在 Adobe DNG SDK 1.7.1 build 2502 更新中通过规范化坐标系修复了该漏洞:使用 srcArea 自身的坐标来访问 tempMaskBuffer 缓冲区。
--- a/source/dng_render.cpp (SDK build 2471 - Vulnerable)
+++ b/source/dng_render.cpp (SDK build 2502 - Patched)
@@ -4021,7 +4021,7 @@ void dng_render_task::ProcessArea (uint32 /* threadIndex */,
dng_pixel_buffer tempMaskBuffer;
...
- uint32 *dPtr = tempMaskBuffer.DirtyPixel (dstArea.t,
- dstArea.l,
+ uint32 *dPtr = tempMaskBuffer.DirtyPixel (srcArea.t,
+ srcArea.l,
dstMaskPlane);
dstArea)来索引属于源区域坐标空间(srcArea)的缓冲区。pointer arithmetic)时,始终检查坐标空间与 stride 之间的兼容性,尤其是在图像处理模块(Crop、Resample、Tile Slicing)中。DefaultCropOrigin 和 DefaultCropSize 直接控制。bgWeight 值(由掩码权重计算得出)。本项目提供了一个完整的 Android 应用(DNGLab),允许直接编译 DNG SDK 的 C++ 源代码,并在 Android Emulator 环境中测试该漏洞的实际行为。