Commit c7e3f9f
committed
collect: capture the EFI marker and the bpf sysctl for replay
SF_EFI_PRESENT is decided by whether /sys/firmware/efi exists, probed
with kasld_access rather than read, but grab copies file contents with
cat and cannot capture a bare directory. No bundle has ever carried the
path, so every replay resolved the captured host as non-EFI. Create the
directory under sysroot/ when the live one exists.
kernel.unprivileged_bpf_disabled was missing from the captured sysctl
list, though environment.c reads it into the hardening state and the
report gates a section on it. A replayed bundle therefore reported it
unread where the capturing host had a value. Add it beside the other
three hardening sysctls already collected.
Set umask 077 for the capture as well. A bundle holds /proc/cmdline,
dmesg, and with --kallsyms the kernel's real symbol addresses, and it
sits in the working directory until it is reviewed and shared; the files
inherited the ambient umask, so on a host with the common 002 they landed
group-writable and world-readable.1 parent e3aec53 commit c7e3f9f
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
27 | 33 | | |
28 | 34 | | |
29 | 35 | | |
| |||
270 | 276 | | |
271 | 277 | | |
272 | 278 | | |
| 279 | + | |
273 | 280 | | |
274 | 281 | | |
275 | 282 | | |
| |||
320 | 327 | | |
321 | 328 | | |
322 | 329 | | |
323 | | - | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
324 | 336 | | |
325 | 337 | | |
326 | 338 | | |
| |||
0 commit comments