Skip to content

[VRP] Ensure untrusted fuzzers do not fuzz in long-lived bots - #5323

Open
PauloVLB wants to merge 8 commits into
masterfrom
vrp-untrusted-fuzzer-safety
Open

[VRP] Ensure untrusted fuzzers do not fuzz in long-lived bots#5323
PauloVLB wants to merge 8 commits into
masterfrom
vrp-untrusted-fuzzer-safety

Conversation

@PauloVLB

@PauloVLB PauloVLB commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Problem

Untrusted fuzzers (e.g., external VRP fuzzers) shouldn't run on long-lived bots because they could be malicious or leak sensitive host info. They should only run in isolated, ephemeral environments like Google Cloud Batch.

Proposed Solution

Filter out fuzzers that aren't marked as trusted from being selected by long-lived bots in the task leasing logic.

Added runtime assertions (log_fatal_and_exit) to ensure that if a long-lived bot somehow ends up running an untrusted fuzzer, it will crash immediately before executing any code.

Chaining Note

This PR is chained on top of vrp-untrusted-fuzzer-ui which introduces the trusted field. Note that trusted defaults to True for now to maintain compatibility with existing fuzzers without requiring a backfill, but it will be flipped to False by default in a future update.

Testing

Validated by checking task assignment logic to confirm long-lived bots do not pick up tasks for non-trusted fuzzers.

@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch 2 times, most recently from 85c2781 to 0e2fa1e Compare June 19, 2026 15:46
@PauloVLB PauloVLB changed the title Vrp untrusted fuzzer safety [VRP] Ensure untrusted fuzzers do not fuzz in long-lived bots Jun 19, 2026
@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch 3 times, most recently from 79ed510 to c868b40 Compare July 16, 2026 16:04
@PauloVLB
PauloVLB changed the base branch from master to vrp-untrusted-fuzzer-ui July 16, 2026 20:10
@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch 3 times, most recently from c09e390 to f3a6d50 Compare July 16, 2026 20:48
@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch 2 times, most recently from 7e42c64 to 8681bdc Compare July 23, 2026 14:11
Base automatically changed from vrp-untrusted-fuzzer-ui to master July 29, 2026 12:37
@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch from 8681bdc to c094792 Compare July 29, 2026 13:39
@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch from c094792 to 41641d6 Compare August 7, 2026 17:33
@PauloVLB

PauloVLB commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

This PR has been pending for some time due to competing priorities and the difficulty of validating changes in dev. Given that we don't have "truly untrusted" fuzzers in production yet and I would like to make progress, I believe it is reasonable to test with a fake untrusted fuzzer in the production environment. That is why I am opening this for review without full validation in dev.

@PauloVLB
PauloVLB marked this pull request as ready for review August 7, 2026 17:43
@PauloVLB
PauloVLB requested a review from a team as a code owner August 7, 2026 17:43
Comment thread src/clusterfuzz/_internal/base/tasks/__init__.py Outdated
Comment thread src/clusterfuzz/_internal/base/tasks/__init__.py Outdated
jobs = get_job_list(jobs_selection)
selected_mappings = [entity for entity in mappings if entity.job in jobs]

if not environment.is_uworker():

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

optional: I've mentioned this on another PR, but it would be very nice to have helper functions that capture what we mean in a more descriptive way. We have separate is_tworker and is_uworker and there is a nuance to using not is_uworker and not is_tworker because it's possible for both is_uworker and is_tworker to be false for our "Trusted" Windows and Mac bots. Perhaps we link the enum of RunTime with their separate capabilities.

fwiw your logic here seems correct :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That’s a good point. I agree that it’s a helpful cleanup, I can make a follow-up PR to address it.

Comment thread src/clusterfuzz/_internal/tests/core/bot/tasks/utasks/uworker_io_test.py Outdated
Comment thread src/clusterfuzz/_internal/tests/core/fuzzing/fuzzer_selection_test.py Outdated
@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch from 41641d6 to ef323f1 Compare August 10, 2026 13:20

@ViniciustCosta ViniciustCosta left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I had a few questions that we discussed offline and I will drop here:

  • Are long-lived bots only running fuzz tasks or is the logic still "get task from queue, if idle, fuzz"?
  • Is this also mapped for mac/android/windows bots?

Comment thread src/clusterfuzz/_internal/base/tasks/__init__.py
Comment thread src/clusterfuzz/_internal/base/tasks/__init__.py
@PauloVLB

Copy link
Copy Markdown
Collaborator Author

@ViniciustCosta

  • Are long-lived bots only running fuzz tasks or is the logic still "get task from queue, if idle, fuzz"?

After #5411, only bots under the ENABLE_FUZZ_FOR_BOTS feature flag can fuzz when idle (which currently includes only windows and mac)

  • Is this also mapped for mac/android/windows bots?

Yes. But since untrusted fuzzers cannot be created with non-Linux jobs (#5329), they should not be an issue.

@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch from ef323f1 to 3581724 Compare August 11, 2026 14:22
@ViniciustCosta

Copy link
Copy Markdown
Collaborator

@ViniciustCosta

  • Are long-lived bots only running fuzz tasks or is the logic still "get task from queue, if idle, fuzz"?

After #5411, only bots under the ENABLE_FUZZ_FOR_BOTS feature flag can fuzz when idle (which currently includes only windows and mac)

  • Is this also mapped for mac/android/windows bots?

Yes. But since untrusted fuzzers cannot be created with non-Linux jobs (#5329), they should not be an issue.

Sgtm, thanks Paulo!

@PauloVLB
PauloVLB force-pushed the vrp-untrusted-fuzzer-safety branch from 3581724 to e6ed726 Compare August 12, 2026 13:27
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.

3 participants