Skip to content

πŸ›‘οΈ Sentinel: [CRITICAL] Fix DoS pipe deadlock vulnerability in Universal Control Relay - #174

Open
NSEvent wants to merge 1 commit into
mainfrom
sentinel-dos-deadlock-fix-4009994127899790463
Open

NSEvent wants to merge 1 commit into
mainfrom
sentinel-dos-deadlock-fix-4009994127899790463

Conversation

@NSEvent

@NSEvent NSEvent commented Sep 12, 2026

Copy link
Copy Markdown
Owner

🚨 Severity: CRITICAL
πŸ’‘ Vulnerability: A child process execution (tailscale status --json) allocated an unread Pipe() to process.standardError. If the child process output to stderr exceeds the OS pipe buffer limit (~64KB), the process blocks on the write, waiting for the parent to read. Because the parent only reads stdout and then waits on waitUntilExit(), this causes a permanent deadlock (DoS) if stderr is not explicitly drained.
🎯 Impact: Denial of Service (application hang).
πŸ”§ Fix: Replaced process.standardError = Pipe() with process.standardError = FileHandle.nullDevice to securely discard unread stderr output and prevent the pipe buffer from blocking the child process.
βœ… Verification: The codebase statically verifies correctly, and the specific vulnerability is patched.


PR created automatically by Jules for task 4009994127899790463 started by @NSEvent

Summary by CodeRabbit

  • Bug Fixes
    • Improved handling of background network status checks by suppressing unused error output.
    • Preserved existing status parsing and results.

… pipe with nullDevice

Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 8ce40416-72f4-40d7-ae62-a496c2897916

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between a467a5f and cb3d6bf.

πŸ“’ Files selected for processing (1)
  • XboxControllerMapper/XboxControllerMapper/Services/Input/UniversalControlMouseRelay.swift

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


πŸ“ Walkthrough

Walkthrough

The Tailscale status subprocess now sends standard error to the null device. Standard output parsing and return behavior remain unchanged.

Changes

Tailscale subprocess output handling

Layer / File(s) Summary
Route unused subprocess stderr
XboxControllerMapper/XboxControllerMapper/Services/Input/UniversalControlMouseRelay.swift
tailscale status --json directs standard error to FileHandle.nullDevice instead of an unread Pipe().

Priority: ⬆️ High

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Merge Risk: βšͺ Minimal Β· up to cb3d6

This change removes the subprocess hang risk while preserving the existing status parsing behavior.

πŸš₯ Pre-merge checks | βœ… 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
βœ… Passed checks (4 passed)
Check name Status Explanation
Description Check βœ… Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check βœ… Passed The title accurately identifies the main change: fixing a denial-of-service pipe deadlock in the Universal Control Relay.
Linked Issues check βœ… Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check βœ… Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches πŸ’‘ 1
πŸ“ Generate docstrings πŸ’‘
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sentinel-dos-deadlock-fix-4009994127899790463

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❀️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant