Commit aa8c314
feat(bpf/file): Tier-3 signal-fallback enforcement for the file class (#212)
Closes the file-class arm of Tier-3 signal-fallback, the symmetric twin
of the already-shipped network arm (handle_tp_connect). On kernels
without BPF-LSM, lsm/file_open cannot attach and open() cannot be denied
with -EPERM; previously the sys_enter_openat tracepoint was pure audit.
It now mirrors handle_tp_connect exactly: when --enforce-fallback=signal
is set (agent_cfg.signal_fallback_enforce) AND the agent is in enforce
mode, an open of a denied path is met with bpf_send_signal() (default
SIGKILL, with the same "default to SIGKILL when no escalation configured"
rule since a tracepoint cannot return -EPERM). Inert by default, so
LSM-capable hosts behave exactly as before (audit-only).
Honesty: this tier is detection+signal, not synchronous denial, and is
PATH-based (the inode is not resolvable at syscall entry) — so it does
NOT carry the inode-alias guarantee proved for lsm/file_open in
proofs/inode_alias_resistance.py. GUARANTEES.md is updated to state the
mechanism now covers both connect() and open(), and to keep the gate
promotion (accepting signal-fallback as PRIMARY enforcement on genuinely
no-LSM hosts) honestly flagged as the remaining follow-up — that step
relaxes the No-Pretend gate and must be validated on a no-LSM kernel.
Reuses the existing --enforce-fallback=signal flag (no new wiring). No
new program/section, so the bpfcompat + kernel-compat manifests are
unchanged; object builds and loads clean on 6.17. Cross-kernel
verifier-safety is gated by the bpfcompat matrix on this PR.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 63ad98f commit aa8c314
2 files changed
Lines changed: 60 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
292 | 309 | | |
293 | 310 | | |
294 | 311 | | |
| |||
323 | 340 | | |
324 | 341 | | |
325 | 342 | | |
326 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
327 | 363 | | |
328 | 364 | | |
329 | 365 | | |
| |||
335 | 371 | | |
336 | 372 | | |
337 | 373 | | |
338 | | - | |
| 374 | + | |
339 | 375 | | |
340 | 376 | | |
341 | 377 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | 159 | | |
| |||
0 commit comments