Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quote the path to sunshinesvc.exe when launching the termination helper #2379

Merged

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Apr 6, 2024

Description

The path to sunshinesvc.exe needs to be quoted because it probably contains spaces, otherwise CreateProcess() will run C:\Program.exe if it's present. Fortunately, C:\ prohibits ordinary user writes, so this type of bug isn't exploitable unless the user has manually loosened ACLs on the system drive.

For good measure, let's just pass the path directly to CreateProcess() to avoid all the executable searching nonsense.

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@cgutman cgutman added this to the v0.23.0 milestone Apr 6, 2024
@cgutman cgutman changed the title Quote the path the sunshinesvc.exe when launching the termination helper Quote the path to sunshinesvc.exe when launching the termination helper Apr 6, 2024
Copy link

codecov bot commented Apr 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 6.49%. Comparing base (7f795f0) to head (1be8f85).

Additional details and impacted files
@@           Coverage Diff            @@
##           nightly   #2379    +/-   ##
========================================
  Coverage     6.49%   6.49%            
========================================
  Files           85      85            
  Lines        18384   18384            
  Branches      8348    8348            
========================================
  Hits          1194    1194            
+ Misses       16149   15363   -786     
- Partials      1041    1827   +786     
Flag Coverage Δ
Linux 4.43% <ø> (ø)
Windows 2.01% <ø> (ø)
macOS-12 8.71% <ø> (ø)
macOS-13 8.06% <ø> (ø)
macOS-14 8.38% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 30 files with indirect coverage changes

@ReenigneArcher ReenigneArcher merged commit 93e6223 into LizardByte:nightly Apr 6, 2024
51 checks passed
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
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