Android security tags, read closely by Lightrion

CVE-2026-58815 AI-generated analysis

platform/frameworks/av, services/camera/libcameraservice/device3 (cameraserver metadata mappers)

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 (7 corrections). Verify against the commit before relying on it.

Changes the per-region loop bound in the camera metering-region mappers (DistortionMapper, RotateAndCropMapper, ZoomRatioMapper) from `j < entry.count` to `j + 5 <= entry.count`. A 5-int32 region tuple is now processed only when all five elements lie inside the metadata entry, which prevents heap out-of-bounds read and write when the region array length is not a multiple of 5.

Root cause

The metering-region tags in kMeteringRegionsToCorrect (e.g. ANDROID_CONTROL_AE_REGIONS) are processed as 5-element int32 tuples, with the weight at offset 4. Six loops iterated with `for (j = 0; j < entry.count; j += 5)`, read `entry.data.i32[j + 4]` (the weight), and passed `entry.data.i32 + j` to an in-place coordinate transform. The loops are in DistortionMapper::correctCaptureRequest / correctCaptureResult, RotateAndCropMapper::updateCaptureRequest / updateCaptureResult and ZoomRatioMapper::separateZoomFromCropLocked / combineZoomAndCropLocked. The transforms are mapCorrectedToRaw, transformPoints plus swapRectToMinFirst, and the zoom region scaling. The loop condition only checked that the first element of the tuple was in range. When entry.count is not a multiple of 5 (the new tests use count 6), the last iteration starts at j = 5 with one element left. The weight read at index 9 and any coordinate access at indices 6..8 then go past the end of the metadata entry buffer. Per the commit message, this is triggered by a CaptureRequest containing such a metering region.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to October 2026 · Findings