Replies: 5 comments 10 replies
-
There were a lot of issues with distributing a bundle previously (LizardByte/Sunshine#186), which is why it was never promoted and eventually removed in favor of the macports build (although homebrew is now the preferred option). You're free to make an attempt at a new app bundle if you want and submit a PR. This should also be a feature request so I will convert it to that. |
Beta Was this translation helpful? Give feedback.
-
Considering this is a security issue, I'm not sure it should be relegated to a feature request, but it's up to you. |
Beta Was this translation helpful? Give feedback.
-
You apparently don't actually want people to file bugs against Sunshine, because you make it a grossly excessive amount of work to do so, and then nitpick those bugs for asinine reasons. That one sentence you quoted already gives a full description of the issue. You can do whatever you want with that information. |
Beta Was this translation helpful? Give feedback.
-
Let me try this again. The bug here is that Sunshine is not distributed as an app bundle. As a consequence, once Sunshine has been granted, say, the Accessibility permission, any process can take advantage of that permission by injecting code into Sunshine. The only way to avoid this problem is to distribute Sunshine as an app bundle, using the hardened runtime for Sunshine and all its dependencies. It is not something that can be solved in another way. The Security bug template indicates that the bug will be secret. This does not make any sense for a tracking bug for a long term task, like distributing Sunshine as an app bundle. This kind of tracking bug should be public, not relegated to a discussion along with a million support questions, or kept as a secret bug that no one can see. You can certainly argue that the security problem is not serious, but it's definitely a bug, and distributing Sunshine as an app bundle is the only way to fix it. I don't necessarily plan to make a pull request to fix it any time soon, and if that means it can't even be tracked as a bug, you're free to run the project that way, although it's odd. |
Beta Was this translation helpful? Give feedback.
-
The security issue here is arguably minor, but it's not something that really requires further explanation. This isn't some tricky attack. It's just what I said. In general, if a binary isn't using the hardened runtime, other applications can inject code into it. Here's one of many ways you might do it. Take a look at the dynamic linkages of the
A local attacker can replace one of those libraries to escalate from one privilege context (i.e., not being able to record the screen) to a different privilege context (i.e., whatever privileges Sunshine has, such as recording the screen). Now you might say, those libraries just shouldn't be writeable by ordinary users -- but they are, because of how Homebrew works. But even if they weren't, it wouldn't solve the problem, because any user who can run the Sunshine binary can just inject arbitrary objects when launching it by specifying This isn't something specific to Sunshine. It's a flaw in any application that requests special permissions on macOS (such as screen recording) and isn't using the hardened runtime as part of an app bundle. I wrote more about this, in a different context, here: https://github.com/cathyjf/keychain-interpose Obviously, because this is just a local privilege escalation, you can say it's not serious. But it does circumvent the macOS security model, and it is a bug. It's not a secret. It's patently obvious to anyone with a basic knowledge of macOS security principles. Treating it as a secret would be laughable. Rather, it's something that requires a long term plan to address, preferably with a top-level tracking bug and a series of sub-bugs. Another reason you might not think that this is serious is that the bug, such as it is, just reduces security to be the same as it would be on Windows or GNU/Linux, where there is no special process for gaining access to record the screen. That is true. But macOS normally has hardened security in this regard, and it would be nice not to undermine it, particularly since the screen recording permission is so powerful. |
Beta Was this translation helpful? Give feedback.
-
Sunshine should be distributed as a proper app bundle, and signed by some trusted certificate (perhaps owned by a trusted maintainer) as part of the GitHub build process. Then the Homebrew formula should be replaced by a cask that just installs the trusted binary. This will solve the following problems:
(See LizardByte/Sunshine#3348 (comment) for context.)
Beta Was this translation helpful? Give feedback.
All reactions