Commit 99a9302
committed
feat(sandbox): Landlock TCP port restriction in Platform mode
When Platform mode is active, apply Landlock ABI v4 network rules to
restrict TCP connect to only the proxy port (default 3128). This makes
the loopback CONNECT proxy mandatory at the kernel level -- a process
calling connect() to any other port gets EACCES.
This closes the cooperative proxy gap identified in the enforcement
analysis: without this, processes ignoring HTTP_PROXY could bypass the
proxy and connect directly (caught only by Tier 3 NetworkPolicy). With
this, enforcement is at Tier 1 (kernel LSM).
Graceful degradation: if the kernel does not support Landlock ABI v4
(e.g. RHEL 9.5 or earlier), the network rules are silently skipped
and enforcement falls back to the cooperative proxy + NetworkPolicy
(same as Issue NVIDIA#899 base behavior).
Ref: NVIDIA#8991 parent a7ad2cd commit 99a9302
1 file changed
Lines changed: 43 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | | - | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
187 | 197 | | |
188 | 198 | | |
189 | 199 | | |
| |||
207 | 217 | | |
208 | 218 | | |
209 | 219 | | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
210 | 251 | | |
211 | 252 | | |
212 | 253 | | |
| |||
0 commit comments