OSX crashes on Sierra as a result of auto-update breaking code signing
Not sure about Windows, but unfortunately on OSX auto-updates break our signature. This results in the OS prompting the user to allow Lantern to set the system proxy, and it looks like that's the extent of it pretty much. Not sure what the solution is.
After auto-update you'll see:
spctl --assess /Applications/Lantern.app
/Applications/Lantern.app: rejected
and will get prompted to enter your password to allow it to set the system proxy.
I haven't see that prompt in my testing, how do you trigger it? What's the Lantern version you started with?
I started with manoto beta8. I think there might actually be two separate issues here:
- I suspect there's something wrong with the signature of the new pac executable
- There seems to be a separate issue with updates breaking our signature which may or may not be related to that specific prompt.
Also once you enter a password once, you don't see the prompt again on subsequent runs..
Yeah the system proxy password prompt is unrelated to the code signing issue for sure -- I get it with a fresh Lantern install on 2.0.0+stable.
So the consequences of this will be felt more in future P2P versions the allow incoming connections. OSX by default allows code-signed applications through the firewall, but otherwise will prompt the user.
Any luck reproducing this @xiam? It's basically just a matter of running spctl before and after the auto-update, so:
spctl --assess /Applications/Lantern.app
Hello @myleshorton,
Still no luck, I started with beta8 and after a while it received the update. I didn't see any prompt and spctl does not says "rejected". Can you try this?
With beta8 manoto:
spctl --assess /Applications/Lantern.app
shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern
e0997b393a6bc8d6e6e32865b6bf0ea127d3589f06eaf58039280d06743a5170 /Applications/Lantern.app/Contents/MacOS/lantern
With beta9 (our fake update for testing):
spctl --assess /Applications/Lantern.app
shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern
1f460a36d72944577455d6c52cfd75a02d9375257c8e0935d0ccacba0d258b8a /Applications/Lantern.app/Contents/MacOS/lantern
Oh, our latest QA alpha for 2.0.0 did trigger the prompt, but the spctl program does not say that it was rejected, do I need to pass some other argument to it?
spctl --assess /Applications/Lantern.app
shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern
a1c2889cdcad5c340767f96ad6f9fe56eba6f0064037e67d9174950047ad775d /Applications/Lantern.app/Contents/MacOS/lantern
The prompt is really 100% unrelated. So this is odd -- I'm seeing something different. This is with manoto beta 8, which maybe makes a difference not sure, all from the same run:
$ spctl --assess /Applications/Lantern.app
$ shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern
e0997b393a6bc8d6e6e32865b6bf0ea127d3589f06eaf58039280d06743a5170 /Applications/Lantern.app/Contents/MacOS/lantern
$ open /Applications/Lantern.app
$ shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern
1f460a36d72944577455d6c52cfd75a02d9375257c8e0935d0ccacba0d258b8a /Applications/Lantern.app/Contents/MacOS/lantern
$ spctl --assess /Applications/Lantern.app
/Applications/Lantern.app: rejected
@myleshorton
According to the checksums you have exactly the same binary that I started with and after a while you upgraded to the same one I was upgraded to. I'm going to try with open and without restarting Lantern to see if there is any difference.
Yeah, same thing. I'm using this script:
#!/bin/bash
spctl --assess /Applications/Lantern.app
shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern /Applications/Lantern.app/Contents/MacOS/lantern
open /Applications/Lantern.app
sleep 10
shasum -a 256 /Applications/Lantern.app/Contents/MacOS/lantern
spctl --assess /Applications/Lantern.app
And I only got the checksums.
./test-2888.sh
e0997b393a6bc8d6e6e32865b6bf0ea127d3589f06eaf58039280d06743a5170 /Applications/Lantern.app/Contents/MacOS/lantern
1f460a36d72944577455d6c52cfd75a02d9375257c8e0935d0ccacba0d258b8a /Applications/Lantern.app/Contents/MacOS/lantern
If you download the 2.0.0+manoto binary update from here https://github.com/xiam/lantern/releases/tag/2.0.0%2Bmanoto, do you have the same results?
bzip2 -d update_darwin_amd64.bz2
shasum -a 256 update_darwin_amd64
1f460a36d72944577455d6c52cfd75a02d9375257c8e0935d0ccacba0d258b8a update_darwin_amd64
spctl --assess update_darwin_amd64
# (nothing)
I did another test with a regular 2.0.0-beta8 from s3 and after a few seconds it got updated to 2.0.0+stable:
./test-2888.sh
c4477f5235b4c1afdccf833c4aaaef8d89f3da120d1c7dab5548eba681b22699 /Applications/Lantern.app/Contents/MacOS/lantern
a1c2889cdcad5c340767f96ad6f9fe56eba6f0064037e67d9174950047ad775d /Applications/Lantern.app/Contents/MacOS/lantern
spctl didn't report anything, though.
This is all using your server correct @xiam?
I.e. you put 2.0.0+stable on your server?
What does spctl --status give you @xiam?
Can you also try spctl --raw -a /Applications/Lantern.app? I'm curious if you might have a cached local assessment before and after the update for some reason.
Also codesign --verify --verbose /Applications/Lantern.app before and after.
This is all using your server correct @xiam?
@myleshorton Yes, this is all with my test server that uses releases listed at https://github.com/xiam/lantern/releases, I took the update binary from the 2.0.0+stable we currently have in QA.
This says nothing:
spctl --assess /Applications/Lantern.app
# (nothing)
But this one says "security disabled".
spctl --assess --verbose /Applications/Lantern.app
/Applications/Lantern.app: accepted
override=security disabled
This other one too:
spctl --raw -a /Applications/Lantern.app
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>assessment:authority</key>
<dict>
<key>assessment:authority:override</key>
<string>security disabled</string>
</dict>
<key>assessment:error</key>
<integer>-67023</integer>
<key>assessment:remote</key>
<true/>
<key>assessment:verdict</key>
<true/>
</dict>
</plist>
The codesign line complains:
codesign --verify --verbose /Applications/Lantern.app
/Applications/Lantern.app: invalid resource directory (directory or signature have been modified)
I don't think this was disabled by default, maybe I did and don't remember. I'm going to try to reenable it and see what happens.
I get:
spctl --assess --verbose /Applications/Lantern.app
/Applications/Lantern.app: accepted
source=Developer ID
This is useful:
https://developer.apple.com/library/mac/technotes/tn2206/_index.html