]> FriiDump Source - friidump.git/blob - docs/reports/FRIIDUMP_CANDIDATE14_LINUX_RAWIO_CAPABILITY.md
Record A102 and B101 live profile evidence
[friidump.git] / docs / reports / FRIIDUMP_CANDIDATE14_LINUX_RAWIO_CAPABILITY.md
1 # FriiDump Candidate14 Linux Raw-I/O Capability Contract
2
3 Candidate14 closes the Linux authorization ambiguity exposed by the Candidate13
4 GCC-4244 B101 diagnostic.
5
6 ## Evidence that required the correction
7
8 Candidate11 completed an exact Linux GameCube dump while its executable carried:
9
10 ```text
11 cap_sys_rawio=ep
12 ```
13
14 Candidate12 and Candidate13 executables had no file capability. Candidate13's
15 instrumented live run showed that ordinary `READ(10)` commands reached the
16 GCC-4244, while every HLDS `0xE7` memory-read command failed host-side with:
17
18 ```text
19 transport_result=-1
20 errno=1 (EPERM)
21 scsi_status=0xFF
22 sense=00/00/00
23 ```
24
25 The difference was authorization, not media state, drive identity, seed
26 geometry, or Candidate12's DAT/lock-reporting corrections.
27
28 ## Candidate14 behavior
29
30 Candidate14:
31
32 - checks effective `CAP_SYS_RAWIO` before known vendor-command paths;
33 - refuses the operation before seed retrieval or Xbox unlock when authority is
34   absent;
35 - prints exact `setcap` and `getcap` commands for the running executable;
36 - records the preflight failure in the native report;
37 - issues STOP UNIT after a failed preflight;
38 - refuses vendor-command execution when the entire process is root;
39 - accepts a normal-user process whose exact executable has
40   `cap_sys_rawio=ep`;
41 - emits an explicit Linux configure/build warning;
42 - provides a maintained capability install/status/remove helper;
43 - documents that rebuilds and file replacement clear capabilities.
44
45 ## Security boundary
46
47 The supported configuration is not an unprivileged process. It is a
48 least-privilege process with one elevated Linux capability attached to one
49 validated executable.
50
51 Do not:
52
53 - run the whole program with `sudo`;
54 - install FriiDump setuid-root;
55 - grant `CAP_SYS_ADMIN` or broader capabilities;
56 - assume a copied or rebuilt executable retained its xattr;
57 - apply a capability before verifying the exact executable being tested.
58
59 ## Build boundary
60
61 The build itself never invokes `sudo` and never applies a capability silently.
62 It prints a warning and leaves the binary unprivileged. The explicit capability
63 phase is a separate installation action requiring user authorization.