Android security tags, read closely by Lightrion

CVE-2026-21353 AI-generated analysis

platform/external/dng_sdk (Adobe DNG SDK 1.7.1): JXL codec glue (dng_jxl.cpp), opcode processing (dng_misc_opcodes.cpp, dng_gain_map.cpp, dng_reference.cpp), memory blocks, safe arithmetic helpers

AI-generated: written from the bulletin and the fixing diffs by claude-fable-5-1, then checked against the code by claude-opus-5-5 (6 corrections). Verify against the commit before relying on it.

Updates external/dng_sdk from build 2410 to 2471, adding overflow-checked arithmetic and range checks to the JXL decode/encode pixel-buffer geometry and allocation sizes in dng_jxl.cpp, an overflow check in dng_ref_counted_block::Allocate, an off-by-one fix in dng_opcode_MapTable::ReplicateLastEntry, and division-by-zero guards for blackLevel == 65535 in the GainMap, MapTable, Vignette and BaselineMapPoly paths.

Root cause

In source/dng_jxl.cpp the pixel-buffer geometry used for JXL processing was derived from decoder-supplied values without overflow checks: jxl_image_chunk_reader and jxl_buffer_chunk_reader get_color_channel_data_at cast size_t xpos/ypos/xsize/ysize to int32 and added them with plain arithmetic to form fArea, and computed fRowStep with SafeUint32Mult (the fix switches to SafeInt32Mult with 0x7fffffff bounds, suggesting a signed-range concern); dng_jxl_decoder::Decode assigned basicInfo.xsize/ysize to dng_point fields without a range check, computed fRowStep with plain multiplication, computed bytesNeeded with unchecked uint64 multiplication, and cast the JxlDecoderImageOutBufferSize result to uint32 without a range check; jxl_memory_block added 160u to bytesNeeded without overflow check and did not check the Malloc result; EncodeJXL_Common computed fRowStep and previewBytesNeeded with plain int32/uint32 multiplication. Wrapped strides or sizes are the hazard these checks guard against (the downstream pixel addressing is not shown). Separately, dng_opcode_MapTable::ReplicateLastEntry read table[fCount] where the table has 0x10000 entries and fCount may equal 0x10000 (one past the end, and in any case the wrong entry), and several black-level normalisations divided by (1 - blackLevel/65535), which is zero when blackLevel == 65535.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to June 2026 · Findings