Skip to content

Fix Android UWORKER initialization crash bypassing test account provisioning#5288

Open
jardondiego wants to merge 3 commits into
masterfrom
fix-android-uworker-auth
Open

Fix Android UWORKER initialization crash bypassing test account provisioning#5288
jardondiego wants to merge 3 commits into
masterfrom
fix-android-uworker-auth

Conversation

@jardondiego
Copy link
Copy Markdown
Collaborator

@jardondiego jardondiego commented May 20, 2026

When executing Android fuzzing tasks within the Untrusted Worker (UWORKER) environment on Swarming, the initialization sequence consistently crashes with a fatal gRPC StatusCode.PERMISSION_DENIED (403) error.

Root Cause

During the Android device setup, device.initialize_device() calls add_test_accounts_if_needed(). This legacy function attempts to retrieve test account credentials by executing db_config.get(), which triggers a query to Google Cloud Datastore. Because UWORKER Docker containers are intentionally stripped of IAM privileges (to prevent malicious payloads from
compromising the database), the Datastore query fails and crashes the entire fuzzing pipeline before the fuzzer can even launch.

Solution

This PR implements a tactical bypass to short-circuit the test account provisioning logic when operating inside an untrusted environment.

  • Added a check (if environment.is_uworker(): return) at the top of add_test_accounts_if_needed().
  • Added unit tests to device_test.py to ensure the bypass functions correctly and prevents the downstream Datastore queries.

Rationale

While the "architecturally correct" fix would involve querying these credentials during the Trusted Worker preprocessing phase and serializing them into the uworker_msg.proto payload, that represents a significant engineering effort.

The vast majority of Android fuzzing targets (especially native binaries and blackbox fuzzers) do not strictly require a logged-in Google account to achieve coverage. This bypass is the least invasive way to immediately unblock Android fuzzing on the Swarming fleet without compromising the UWORKER security boundaries.

Diego Jardon added 2 commits May 20, 2026 22:53
This adds a tactical bypass to 'add_test_accounts_if_needed' so that UWORKERs (which lack Datastore IAM privileges) immediately return without causing a fatal '403 Missing or insufficient permissions' exception during device initialization.
@jardondiego jardondiego marked this pull request as ready for review May 20, 2026 23:02
@jardondiego jardondiego requested a review from a team as a code owner May 20, 2026 23:02
@jardondiego jardondiego changed the title Fix Android UWORKER crash during test account provisioning Fix Android UWORKER initialization crash bypassing test account provisioning May 20, 2026
Copy link
Copy Markdown
Collaborator

@fernandofloresg fernandofloresg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved only had one question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants