Skip to content

🛡️ Sentinel: [HIGH] Fix DoS via Pipe Deadlock in UniversalControlMouseRelay - #171

Open
NSEvent wants to merge 3 commits into
mainfrom
sentinel/fix-dos-pipe-deadlock-11191703040972347591
Open

NSEvent wants to merge 3 commits into
mainfrom
sentinel/fix-dos-pipe-deadlock-11191703040972347591

Conversation

@NSEvent

@NSEvent NSEvent commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

🚨 Severity: HIGH
💡 Vulnerability: The tailscale status command executed in UniversalControlMouseRelay created a Pipe() for standardError but never read from it. If the child process output exceeds the OS pipe buffer (~64KB), it blocks, causing a deadlock and DoS.
🎯 Impact: Denial of Service due to deadlock.
🔧 Fix: Changed process.standardError = Pipe() to process.standardError = FileHandle.nullDevice to safely discard unread stderr output and prevent deadlocks.
✅ Verification: Ran a Python syntax validation script to ensure Swift file correctness.


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

Summary by CodeRabbit

  • Chores
    • Improved background network status handling by suppressing unnecessary diagnostic output while preserving existing functionality.

…eRelay

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 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 51bdfe63-1939-4a7f-8bd2-785833bc5e90

📥 Commits

Reviewing files that changed from the base of the PR and between 5ad068c and a8436c9.

📒 Files selected for processing (2)
  • XboxControllerMapper/XboxControllerMapper/Services/Mapping/MappingEngine.swift
  • XboxControllerMapper/XboxControllerMapperTests/OBSWebSocketLiveIntegrationTests.swift

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 3fecc010-1831-4254-b384-f1176790ed3b

📥 Commits

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

📒 Files selected for processing (1)
  • XboxControllerMapper/XboxControllerMapper/Services/Input/UniversalControlMouseRelay.swift

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


📝 Walkthrough

Walkthrough

The Tailscale status subprocess in tailscalePeerHosts() now discards standard error output. Standard output capture and existing error handling remain unchanged.

Changes

Tailscale subprocess handling

Layer / File(s) Summary
Discard Tailscale stderr output
XboxControllerMapper/XboxControllerMapper/Services/Input/UniversalControlMouseRelay.swift
Routes Tailscale subprocess stderr to FileHandle.nullDevice instead of capturing it with a pipe.

Priority: ⬇️ Low

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

Merge Risk: ⚪ Minimal · up to 5ad06

Tailscale status stderr is now discarded instead of being written to an unread pipe, preventing subprocess deadlock while preserving stdout-based peer discovery. No current merge-blocking risk remains.

🚥 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 clearly identifies the main change: fixing a pipe deadlock that could cause a denial-of-service condition in UniversalControlMouseRelay. The security prefix and emoji do not prevent the titl…
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.
✨ 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/fix-dos-pipe-deadlock-11191703040972347591

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.

google-labs-jules Bot and others added 2 commits September 9, 2026 09:35
Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
Co-authored-by: NSEvent <44446865+NSEvent@users.noreply.github.com>
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