This repository was archived by the owner on Nov 12, 2026. It is now read-only.
Repository navigation
Commit 59d148a
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.
Graceful degradation: if kernel ABI < v4, the network rules are
silently skipped with a warn-level log and enforcement falls back
to the cooperative proxy + NetworkPolicy.
Also fixes rules_applied underflow via saturating_sub.
Ref: NVIDIA#899
Signed-off-by: Ladislav Smola <[email protected]>1 parent ec5655e commit 59d148a
1 file changed
Lines changed: 41 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| |||
207 | 215 | | |
208 | 216 | | |
209 | 217 | | |
| 218 | + | |
| 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 | + | |
210 | 247 | | |
211 | 248 | | |
212 | 249 | | |
| |||
215 | 252 | | |
216 | 253 | | |
217 | 254 | | |
218 | | - | |
| 255 | + | |
219 | 256 | | |
220 | 257 | | |
221 | 258 | | |
| |||
0 commit comments