“Huge” number of Mac apps vulnerable to hijacking, and a fix is elusive
arstechnica.com
arstechnica.com
The fact that sparkle renders the feed in a webview is bad, but the reason this is a big issue is because developers aren't using TLS/SSL/https for their update feed URLs. Even if Sparkle is fixed in the app itself your list of binaries can still be hijacked. It always could and always will.
It's 2016, every developer needs to take this seriously. Just because it's a pain in the ass to install an SSL certificate on a web server doesn't mean you can just skip it.
Sparkle already uses digital signatures for the updates themselves. That's why everybody thought using HTTP was safe. The problem arose when it turned out that the feed itself, which is not signed, can be used to execute arbitrary code.
Merely using HTTPS is a vast improvement, but it still means that anybody who manages to e.g. take over your server can then cause all of your users to execute arbitrary code. With good key management this is not possible with a fixed Sparkle, since the only code being executed is in the updated app, and the updated app is signed with a key which you should be keeping offline.
MAS apps can also stop running at any time if the DRM checks suddenly fail (e.g. if a certificate expires).
I don't think any of those apply to VLC or uTorrent... The main problem of MAS (for app that don't need what above) is the app store app in itself (it's garbage) and the review time (that hit back anytime you need to patch something fast)... otherwise the model it's not bad per se...
A lead VLC dev listed a bunch of the issues here: https://news.ycombinator.com/item?id=7039737
I agree about the store app itself being awful
Setting Xcode aside, though, the idiomatic "modern OSX" model seems to be one where GUI apps have to own all the files they interact with, usually clumping them together into media-typed document bundle folders. (Xcode's mechanism wouldn't be nearly as inexplicable if the rest of the files lived inside the .xcodeproj.)
An idiomatic OSX text editor app would thus, naively, probably have to be quite crippled: the GUI app would have to simply copy your repo into a project document, and make all its edits in there. No ability to watch for git-initiated changes to the source dir or anything.
But I think there is still a way to idiomatically support the Unix philosophy of "small components, working together against shared files" in modern OSX. You just can't rely solely on GUI apps to enable it. Instead, you need a separate CLI component that "lives in" the un-sandboxed Unix world to be the manager of the Unix-style integration.
Imagine the text editor working on its project bundle, and then a separate CLI component sitting there and just monitoring both the project bundle, and the git working directory—and bidirectionally syncing between them. The sandboxed app still gets to be a sandboxed app, and "works" on its own when the component isn't installed. The component—brought in from outside the MAS, maybe through e.g. Homebrew—just makes extra magic happen.
I'm unsure why more MAS apps aren't designed like this, honestly. It's perfectly sensible for Development apps, at the very least; we all install Homebrew anyway.
A lot of apps violate the MAS limitations in ways people don't realise. There are people in this thread claiming that VLC would fit within the MAS model even though it can't (at least not without ditching a lot of features).
Even if an app fits inside the limitations today, it may not in the future, and migrating away from the MAS is a huge hassle. It's also possible for the limitations to change so apps that are allowed now may not be in the future meaning those apps can't be updated at all, which is something that has already happened.
[0] https://news.ycombinator.com/item?id=7039737
[1] as far as I know torrent apps are banned from the store
[2] http://blog.sketchapp.com/post/134322691555/leaving-the-mac-...
[1] http://www.macrumors.com/2015/11/12/mac-app-store-apps-damag...
If so, wouldn't you have to validate receipts against a new certificate once the old one expires?
I do think Apple really is to blame here though, the MAS is frankly a big pile of junk, for users, but in particular for developers. It looks like they just launched it and called it a day, the interface is slow, clunky, it doesn't work properly if you have multiple accounts (and there's no way to merge them), updates often fail to download, searching is a mess etc. This is all just user-level complaints, apparently for developers things are even worse if you read around. Over the last year or two almost any app I initially installed through the MAS appears to have moved away from it...
Michael Tsai had a good roundup of just how widespread that trend's becoming and how it's driven by only a few issues like the inability to do paid upgrades and the slow review process:
http://mjtsai.com/blog/2015/12/01/sketch-leaving-the-mac-app...
I really wish the Mac App Store was more like Yum/APT where you have a single update mechanism with baked-in mandatory security but otherwise leave publishing up to the actual developers. If Apple wants to have a curated store with reviews, etc. that's fine but it's just not viable as the only option for every class of application.
And there's no particular reason everything in the App Store must be sandboxed. It used to not be required, then Apple changed the rules. Sandboxing helps with security, but for this particular question of a vulnerable app updater, simply using the App Store's update mechanism would suffice to make it safe, even for non-sandboxed apps.
Besides the reliable updater, it'd be really nice just for them to be able to flip the kill-switch on known-exploitable apps ASAP when something bad happens.
9 1.5 Beta
2 1.5 Beta 5
12 1.5 Beta 6
1 1.5
1 1.6
3 1.8.0
1 1.9.0
2 1.10.0
1 1.12.0
1 1.13.1
However note that Sparkle 1.5 isn't even compatible with El Cap, I expect a number of these are in software I haven't launched in years and have just been carrying from migration to migration, the up-to-date software may be using an up-to-date sparkle.Or not.
Probably not though, considering Acorn 5.2.1 (released in December 2015, the same day as Sparkle 1.12.0) uses Sparkle 1.9.0 (released in January 2015)
Also I undercounted the number of old versions, turns out ancient sparkles didn't have a CFBundleShortVersionString in their plist and I also have a bunch of Sparkle 1.0 and 1.1 lying around.
find /Applications -path '*Autoupdate.app/Contents/Info.plist' -exec echo {} \; -exec grep -A1 CFBundleShortVersionString '{}' \; | grep -v CFBundleShortVersionString
This gives an overview of the programs using sparkle, and which version.
As an example, in my case this concerns MacVim (on one computer only though)
Edit: maybe this is somehow tied to Cask?
* there are applications which use the Sparkle framework but not the Autoupdate app, and apparently applications which contain Autoupdate.app but it doesn't have a CFBundleShortVersionString. On my machine, 43 application bundles contain Sparkle, 10 have an Autoupdate.app and 9 have an Autoupdate.app with a CFBundleShortVersionString plist key. Reading Sparkle.framework/Versions/A/Resources/Info.plist would be more reliable, but even that is not perfect, some of those don't have a CFBundleShortVersionString, only a CFBundleVersion (those are most likely the downright ancient Sparkle versions, we're talking 1.0 and 1.1)
% plutil -p /Applications/iTerm.app/Contents/Info.plist| grep SUFeedURL
"SUFeedURLForFinal" => "https://iterm2.com/appcasts/final.xml"
"SUFeedURLForTesting" => "https://iterm2.com/appcasts/testing3.xml"/Applications/Utilities/XQuartz.app/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app/Contents/Info.plist <string>1.6</string>