- Notifications
You must be signed in to change notification settings - Fork5
Commitb74def3
authored
chore: ensure downloaded slim binary version matches server (#211)
Relates to#201.**After we've validated the binary signature**, we exec `coder version --output=json` to validate the version of the downloaded binary matches the server. This is done to prevent against downgrade attacks, and to match the checking we had on the dylib before.Additionally, this PR also ensures the certificate used to sign the binary is part of an Apple-issued certificate chain.I assumed we were checking this before (by default) but we weren't. Though we weren't previously checking it, we were only ever downloading and executing a dylib. My understanding is that macOS won't execute a dylib unless the executing process and the dylib were signed by the same Apple developer team (at [least in a sandboxed process](https://developer.apple.com/forums/thread/683914), as is the Network Extension).Only now, when `posix_spawn`ing the slim binary from an unsandboxed LaunchDaemon, is this check absolutely necessary.1 parent8c08563 commitb74def3
File tree
2 files changed
+53
-9
lines changed- Coder-Desktop
- Coder-DesktopHelper
- VPNLib
2 files changed
+53
-9
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
79 |
| - | |
| 79 | + | |
| 80 | + | |
80 | 81 |
| |
81 | 82 |
| |
82 | 83 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
| 2 | + | |
2 | 3 |
| |
3 | 4 |
| |
4 | 5 |
| |
| |||
7 | 8 |
| |
8 | 9 |
| |
9 | 10 |
| |
10 |
| - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
11 | 14 |
| |
12 | 15 |
| |
13 | 16 |
| |
| |||
21 | 24 |
| |
22 | 25 |
| |
23 | 26 |
| |
24 |
| - | |
25 |
| - | |
| 27 | + | |
| 28 | + | |
26 | 29 |
| |
27 | 30 |
| |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 |
| |
29 | 36 |
| |
30 | 37 |
| |
| |||
37 | 44 |
| |
38 | 45 |
| |
39 | 46 |
| |
| 47 | + | |
40 | 48 |
| |
41 | 49 |
| |
| 50 | + | |
| 51 | + | |
| 52 | + | |
42 | 53 |
| |
43 | 54 |
| |
44 |
| - | |
45 |
| - | |
| 55 | + | |
| 56 | + | |
46 | 57 |
| |
47 | 58 |
| |
48 | 59 |
| |
49 | 60 |
| |
50 |
| - | |
| 61 | + | |
51 | 62 |
| |
52 | 63 |
| |
53 | 64 |
| |
54 | 65 |
| |
55 |
| - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
56 | 73 |
| |
57 | 74 |
| |
58 | 75 |
| |
| |||
78 | 95 |
| |
79 | 96 |
| |
80 | 97 |
| |
81 |
| - | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
82 | 125 |
| |
83 | 126 |
|
0 commit comments
Comments
(0)