Android security tags, read closely by Lightrion

CVE-2026-58966 AI-generated analysis

platform/external/hplip, prnt/hpps/hppsfilter.c (HP PostScript CUPS filter, hppsfilter)

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.

Replaces unbounded sprintf calls with snprintf and rewrites strncpy calls in prnt/hpps/hppsfilter.c (external/hplip) so the copy limit is the destination size minus one with explicit NUL termination, preventing fixed-size buffers from being overrun by job arguments, CUPS options and PPD values.

Root cause

hppsfilter.c builds PJL/PostScript command strings in fixed-size buffers (buffer, sec_pin_command[MAX_BUFFER], sfile_name[FILE_NAME_SIZE], final, input_slot, newline, finalstr). It used sprintf with variable strings (argument[1], argument[2], argument[3] from argv, cupsGetOption values, GetOptionValue PPD values, sec_pin, finalstr, gethostname/getdomainname results) with no size limit, and used strncpy(dst, val, strlen(val)), which bounds the copy by the source length rather than the destination size, so long values overflow and the copy is not NUL terminated. In GetPPDValues, strncpy(finalstr,&newstring[1],i-1) copied up to the newline position with no check of i against sizeof(finalstr) and no lower bound check on i. In main, the HPBookletPageSize copy used a hard-coded 64 rather than the buffer size.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to November 2026 · Findings