Android security tags, read closely by Lightrion

CVE-2024-34743 AI-generated analysis

platform/frameworks/native, SurfaceFlinger (services/surfaceflinger)

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.

Changes the sanitization loop in SurfaceFlinger::setTransactionState to iterate ComposerState entries by reference (auto&) instead of by value, so layer_state_t::sanitize(permissions) actually strips privileged fields from the states that are later applied.

Root cause

In services/surfaceflinger/SurfaceFlinger.cpp, SurfaceFlinger::setTransactionState computes the caller's permissions via LayerStatePermissions::getTransactionPermissions(originPid, originUid) and then loops `for (auto composerState : states) { composerState.state.sanitize(permissions); }`. Because the loop variable is declared `auto` (by value), each iteration operates on a copy of the ComposerState. sanitize() cleared privileged fields on the copy, which was then discarded. The original entries in `states` stayed unsanitized, so permission-gated layer state from an unprivileged caller was not removed. The trusted-overlay flag is the example exercised in the test.

How the fix works

Completeness

Behavior changes

Per major

Unknowns

Back to August 2024 · Findings