Android security tags, read closely by Lightrion

CVE-2026-58853 AI-generated analysis

platform/packages/services/BuiltInPrintService, libwfds JNI IPP helper (jni/ipphelper/ipphelper.c)

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

Adds bounds checks in jni/ipphelper/ipphelper.c (the media-supported loop in parse_getMediaSupported and the helper addMediaIfNotDuplicate) so that media entries parsed from a printer's Get-Printer-Attributes response can no longer be written past the PAGE_STATUS_MAX-sized arrays in media_supported_t.

Root cause

parse_getMediaSupported in jni/ipphelper/ipphelper.c fills media_supported->media_size[] and media_supported->idxKeywordTranTable[] using a running index, sizes_idx. These are fixed-size arrays of PAGE_STATUS_MAX entries (200 per the test comment). The media-supported loop went through every value up to ippGetCount(attrptr) with no upper bound on sizes_idx. The helper addMediaIfNotDuplicate wrote media_size[*sizes_idx] and idxKeywordTranTable[*sizes_idx] and incremented *sizes_idx without checking it against PAGE_STATUS_MAX. As a result, a Get-Printer-Attributes response with more than 200 recognized media values in media-supported caused writes past the end of the arrays. The added test says this was a stack buffer overflow / crash before the fix.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings