CVE-2025-26433 AI-generated analysis
platform/frameworks/native, SurfaceFlinger (services/surfaceflinger/Layer.cpp, Layer.h), input window info reporting to InputDispatcher
SurfaceFlinger's Layer now records a hasRequestedInputInfo flag when setInputInfo is called with a non-null token or the NO_INPUT_CHANNEL config, and needsInputInfo() uses that flag instead of hasInputInfo() to decide whether the layer must be reported to the InputDispatcher.
Root cause
Layer::needsInputInfo() in Layer.h decides whether a layer is reported to the InputDispatcher. Its comment says this is used for PID based occlusion detection. Before the fix it returned (hasInputInfo() || hasBufferOrSidebandStream() || fillsColor()) && !mPotentialCursor. hasInputInfo() is declared in Layer.h, but the material does not show its body. Nothing recorded whether the layer had explicitly requested input info, meaning a WindowInfo with a token or an explicit NO_INPUT_CHANNEL. The material does not show the exact faulty scenario. The bulletin rates the issue as a High severity EoP.
How the fix works
- Layer.h: adds `bool hasRequestedInputInfo` to Layer::State (DrawingState) next to `gui::WindowInfo inputInfo`, and an accessor `hasRequestedInputInfo()` that returns getDrawingState().hasRequestedInputInfo.
- Layer.cpp Layer::Layer(const LayerCreationArgs&): sets mDrawingState.hasRequestedInputInfo = false along with the other DrawingState defaults.
- Layer.cpp Layer::setInputInfo(const WindowInfo& info): after storing info, sets mDrawingState.hasRequestedInputInfo = (info.token != nullptr) || info.inputConfig.test(WindowInfo::InputConfig::NO_INPUT_CHANNEL). The touchableRegionCrop and modified handling is unchanged.
- Layer.h Layer::needsInputInfo(): replaces hasInputInfo() with hasRequestedInputInfo() in the OR condition. A layer is now reported if it requested input info, has a buffer or sideband stream, or fills color, and in every case only if it is not a potential cursor.
Completeness
- The fix covers only the needsInputInfo() decision. hasInputInfo() stays in place unchanged (its definition is not in the material), so any other callers of hasInputInfo() keep the old behavior.
- Only two places write the flag: the Layer constructor (false) and Layer::setInputInfo(). Each setInputInfo call recomputes it, so a later call with a null token and without NO_INPUT_CHANNEL clears it again. The material does not show the callers, so it is unclear whether this matters.
- The other terms of needsInputInfo() (hasBufferOrSidebandStream, fillsColor, mPotentialCursor) are untouched.
- The commit is a [DO NOT MERGE] cherry-pick of two internal changes. On Android 16 and 17 only 1 of 8 patched lines is present, so the code is different there.
Behavior changes
- Layers whose WindowInfo has a non-null token or the NO_INPUT_CHANNEL input config now pass needsInputInfo() whatever hasInputInfo() returns, as long as they are not potential cursors.
- Layers that never set a token or NO_INPUT_CHANNEL through setInputInfo, have no buffer or sideband stream, and do not fill color no longer pass needsInputInfo(), even when hasInputInfo() would have returned true.
- No new error codes and no API change. Layer::State gains one bool.
Per major
- Android 14: Same fix: commit 8f0ff6ba7706 in android-security-14.0.0_r31 (resolved by bug id); all 8 patched lines are present.
- Android 15: The bulletin lists 15, but no published commit is linked (announced-not-published). At android-security-15.0.0_r19, 8 of 8 lines of the patched region are present, which suggests the change is applied, but no commit confirms it.
- Android 16: Not affected per the bulletin. At android-security-16.0.0_r10 only 1 of 8 patched lines is present, so the code differs there.
- Android 17: Not affected per the bulletin. At android-security-17.0.0_r3 only 1 of 8 patched lines is present, so the code differs there.
Unknowns
- The body of Layer::hasInputInfo() and how it differs from the new flag. The exact scenario in which a layer was wrongly excluded from, or included in, InputDispatcher reporting is not shown.
- The transaction or caller path that invokes Layer::setInputInfo, and whether unprivileged clients can reach it or set a token or NO_INPUT_CHANNEL. The index search returned no caller.
- Why the bulletin lists Android 15 as affected without a published commit, when the patched region is present at android-security-15.0.0_r19.
- Whether equivalent logic exists in other SurfaceFlinger code paths on 14 or in the restructured code on 16 and 17.
- What the two internal cherry-picked changes contain beyond this combined diff.