Android security tags, read closely by Lightrion

CVE-2024-31317 AI-generated analysis

platform/frameworks/base, core/java/android/os/ZygoteProcess.java (system_server side of the zygote command protocol, hidden API exemption and process start paths)

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.

Adds character validation in core/java/android/os/ZygoteProcess.java so that hidden API denylist exemption strings containing '\n', '\r' or '\u0000' are rejected (list cleared, nothing written) before reaching the zygote command socket, and process start arguments containing '\u0000' now throw ZygoteStartFailedEx alongside the existing newline and carriage return checks.

Root cause

The zygote wire format is a count followed by newline-separated argument strings (see the comment in zygoteSendArgsAndGetResult referencing com.android.internal.os.ZygoteArguments.parseArgs()). The method in ZygoteProcess.java that writes mApiDenylistExemptions to state.mZygoteOutputWriter (HiddenApiSettings.update() per the commit message) did not check the exemption strings for embedded '\n', '\r' or NUL before writing the count (size + 1) and the list. Because of this, embedded line breaks could break the newline-based framing. Separately, zygoteSendArgsAndGetResult rejected embedded '\n' and '\r' in process start args but not '\u0000'.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to June 2024 · Findings