CVE-2026-59006 AI-generated analysis
platform/frameworks/base, WindowManager (services/core/java/com/android/server/wm/WindowState.java, touch occlusion mode for insets source windows)
WindowState.getTouchOcclusionMode() now returns TouchOcclusionMode.USE_OPACITY for insets source windows that have a controllable insets provider (e.g. the IME window), so a nearly transparent insets source window is judged by opacity instead of by the BLOCK_UNTRUSTED path.
Root cause
getTouchOcclusionMode() returned USE_OPACITY only for system alert window types, when the window was animating (isAnimating(PARENTS | TRANSITION, ANIMATION_TYPE_ALL)) or when it was in a transition (inTransition()). In every other case it returned BLOCK_UNTRUSTED. An insets source window such as the IME has a controllable insets provider (mControllableInsetProvider), and that provider's control target can drive the window. Per the commit message, the control target can keep the window in a persistent nearly transparent state (alpha=0.0001) and trick the user into clicking a certain area of it. If that area has autofill hints, the click leaks the info to the app. Opacity was not considered for such a window because none of the USE_OPACITY conditions applied.
How the fix works
- services/core/java/com/android/server/wm/WindowState.java:getTouchOcclusionMode(): the USE_OPACITY condition is extended with '|| inInsetsAnimation()', so insets source windows with a controllable provider are handled by opacity rather than BLOCK_UNTRUSTED.
- services/core/java/com/android/server/wm/WindowState.java:inInsetsAnimation() (new, Android 14/15/16 variant): returns 'mControllableInsetProvider != null'. The code comment says the server does not know whether the control target is animating the window, so any window with a controllable insets provider is treated as USE_OPACITY.
- services/core/java/com/android/server/wm/WindowState.java:inInsetsAnimation() (Android 17 variant): if mControllableInsetProvider is non-null, it reads the provider's source type (getSource().getType()) and its control target (getControlTarget()). It returns true only when target != null and (target.getAnimatingTypes() & insetsType) != 0, and false otherwise. This is a narrower check tied to the insets types the control target reports as animating.
- services/tests/wmtests/src/com/android/server/wm/WindowStateTests.java:testGetTouchOcclusionModeOfImeWindow (new): sets the IME window on the ImeInsetsSourceProvider, gives an app window control via updateControlForTarget and asserts that getTouchOcclusionMode() == USE_OPACITY. The 17 variant also asserts BLOCK_UNTRUSTED when the app's animating types are 0, and USE_OPACITY after setAnimatingTypes(WindowInsets.Type.ime(), null).
Completeness
- Covers every WindowState with a non-null mControllableInsetProvider. On 14/15/16 this applies whether or not an animation is actually in progress. It includes the IME window described in the bug and any other insets source window with a controllable provider.
- The 14/15/16 variant is a coarse over-approximation (comment: 'We don't know if the control target is animating this window or not'). The 17 variant is narrower and depends on InsetsControlTarget.getAnimatingTypes(), so on 17 a window is only covered while the control target reports the matching insets type as animating.
- The system-alert-window, isAnimating() and inTransition() branches are unchanged, so windows that are not insets sources and are not animating still return BLOCK_UNTRUSTED. The insets control path that lets the control target change the window is not modified. The fix only changes the touch occlusion mode reported for the window.
Behavior changes
- Insets source windows with a controllable insets provider (the IME and similar) now report TouchOcclusionMode.USE_OPACITY instead of BLOCK_UNTRUSTED. On 14/15/16 this holds for as long as the provider is set. On 17 it holds only while the control target is animating that insets type.
- Per the commit message, when such a window is nearly transparent 'the user cannot click on it'. This may affect interaction with an IME kept at low alpha.
- TouchOcclusionMode is the value WindowManager passes to InputDispatcher through InputWindowHandle for untrusted-touch occlusion decisions (general platform knowledge).
Per major
- Android 14: same fix (a5712fbdb970, android-security-14.0.0_r31): identical WindowState change, and inInsetsAnimation() returns mControllableInsetProvider != null. Only the surrounding context differs (attach() follows instead of updateGlobalScale()). The test uses createWindow and the 2-arg updateControlForTarget.
- Android 15: same fix (db8ee6a9fec4, android-security-15.0.0_r19): this is the analysed commit. inInsetsAnimation() returns mControllableInsetProvider != null.
- Android 16: same fix (dbab9c94338c, android-security-16.0.0_r10): identical WindowState change. The test is adapted to newWindowBuilder(...).build() and the 3-arg updateControlForTarget(app, false, null).
- Android 17: adapted fix (3b5efd2d2a84, android-security-17.0.0_r3): the condition is isAnimating(PARENTS, ANIMATION_TYPE_ALL) || inTransition() || inInsetsAnimation(). inInsetsAnimation() checks that the provider's control target has the source's insets type in getAnimatingTypes(). The test uses imeProvider.setWindow and app.setAnimatingTypes to assert both the BLOCK_UNTRUSTED and the USE_OPACITY outcomes.
Unknowns
- The commit lists two Cherrypick-From sources (644d73a56d13 and e25bc4b51c02). The material does not show what the second upstream commit contained, or whether it corresponds to the narrower 17 variant.
- The material does not show how InputDispatcher applies USE_OPACITY to the touched window itself versus windows above it. The effect described here is taken from the commit message.
- The material does not show the client-side insets control path by which the control target sets the source window's alpha, or whether getTouchOcclusionMode() has callers other than the input window handle update.
- The material does not show whether InsetsControlTarget.getAnimatingTypes() exists on 14/15/16.