aboutsummaryrefslogtreecommitdiffstats
path: root/psp_out/AUDIT-ROUND-NEW-VULN-HUNT.md
blob: b510d61e1c309d49fd5c6a010e5a18edeebef7fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Audit round — hunt for a new vulnerability (surfaces cleared)

Negative results from this round, recorded so the surfaces are not re-walked.

| surface | result |
|---|---|
| ASD SRM **v9** walker `asd_srm_sub_12DB0` | **BUG FOUND** — see `VULN-ASD-SRM-V9-WALKER-OOB-READ.md` |
| ASD `dword_D440C0[]` callback table (cmd `0x18c` passes an attacker length to it) | Unresolvable: runtime-installed, **0 static literals** for `0xD440C0` in the image. Matches the prior audit's note. |
| ASD `asd_set_link_param_40/44/48/4C` (no bound on `96*a1`) | **False positive.** Reached only via `j_sub_*` op-table thunks; they write a *fixed* value (4/16) and the index is bounded by the caller. |
| ASD session-index handlers (26 computing `96*idx+base`) | All 22 reachable ones bound the index (`>0x3E`/`>0x3F`/`<=0x3E`). |
| RAS `ras_attach_response_buffer` `len - 0x828` | **Guarded** — `ras_map_shared_buffer` rejects `len < 0x828` (`cmp r0,r2; blo`). |
| RAS `ras_fill_response_footer` (+0x410) | In bounds: writes at `buf+1040`, gate is `>= 2088`. |
| RAS commands 0–4 | **Inert in this build** — all five dispatch through runtime callbacks (`off_4060AC/B0/B8/BC`, `[+0x54]`) that are never installed; `ras_get_chiplet_*` are stubs. |
| RAS TRIGGER_ERROR -> `ras_dram_range_config` | Host dwords are validated to small enumerations (`v4 in {0,2,4}`, `v5 in {0..4}`); register offsets come from internal tables, not the request. |
| DTM TA (**exhaustive**, all 3 handlers) | **Clean.** `TA_InvokeCommandEntryPoint` enforces `size >= 0x50`; handlers bound `req[9] <= 0x17`; deepest read `buf+75` < 80. |
| HDCP `TA_InvokeCommandEntryPoint` size gate | **Correct.** `BHI loc_401408` branches *into* the dispatch, so the gate **requires** `size > 0x2817` (10263) vs max offset 5136 used. (I initially misread `BHI` as the reject path and briefly believed the lower bound was missing — it is not.) |
| TA->sOS SVC boundary (`svc_7C_A0_mem_write`, `svc_A5_reg_write64`) | Handlers themselves do not bounds-check, but `vawin_map_fixed` -> `sos_check_va_window_request` implements real access control: two protected windows (`~0x3700000-0x3800000`, `~0x3900000-0x3A00000`), an `addr+size` overflow guard (`cmp r1,r0; blo fail`), and a per-process capability byte. Address arguments come from ASD-internal tables, not host data. |

## Refuted hypotheses (recorded so they are not re-raised)

1. **"The v9 walker dereferences an attacker-controlled pointer from the blob."**
   REFUTED. Hex-Rays renders `ADD.W R5, R0, #0xC` as `v2 = dword_D1F044`, which
   *looks* like a load of a blob-resident pointer. The disassembly shows it is
   address arithmetic (`&asd_srm_buf + 12`). Checked before reporting.
2. **"HDCP's shared-buffer size gate has no lower bound."** REFUTED — see above.
3. **"`0x308` gives an unauthenticated way to plant SRM content."** REFUTED.
   Both writers of `asd_srm_buf` require `asd_srm_header_check(...) == 0`
   (RSA verify via `asd_srm_verify_t8/t9`). Only the 0x308 OOB *read* is
   unauthenticated. `DISCLOSURE-SUMMARY.md` §1.7 has been corrected.

--------------------------------------------------------------------------------
## Round 2 — host-facing SYS_DRV RPC surface (the prior audit's own #1 target)

| lead | result |
|---|---|
| `sos_proc_switch` third `msg` window | **BUG FOUND** — `VULN-SOS-PROCSWITCH-MSG-HEADROOM.md` |
| `sysdrv_rpc_dispatch` `0x1002` validation carve-out | **Already documented** (`AUDIT-ROUND-RAS-DTM-SYSDRV.md:82`) as a non-reachable hardening gap. Not new. |
| `validate_client_range` `a4 == 0` early-accept | Not a separate bug: `client` originates from sOS's SVC 0xF2 handoff (`sysdrv_entry(a1, a2=client, a3=frame)`); `a3` is pinned to 2 by the dispatcher (`HIDWORD(v42)=2`), so the `a3==1` arm is dead here. |
| `LOAD_IP_FW` fw_type 49/50/85 skip the `size <= 0xFF` gate | Real, but **not an overflow**: both sinks independently reject `size > 0x200` into a 512-byte buffer. Worth noting that these three types also return **before** `verify_image_signature`. |
| `buffer_copy_bounded` "host-controlled register write" | ~~REFUTED~~ **-- MY REFUTATION WAS WRONG; THE FINDING IS REAL.** I dumped the function only to `0xe10080`, saw four special cases with hardcoded addresses, and assumed the in-range branch did no write (I literally wrote "no SVC?" and then asserted it). Following `BLS loc_E1008A` shows the general path: `R0` = host qword LOW dword = **address** (constrained to `[0x21500,0x21B78]`), `R1 = [&qword+4]` = host qword HIGH dword = **value, entirely unconstrained**, then `SVC 0x7C`. That is **up to 64 attacker-chosen 32-bit register writes per call** (`size<=0x200`, `size>>3` iterations), executed by the PSP, with **no signature check** on this path. Independently identified as "Route C" in `new/ACTIONABLE-FINDINGS.md`. See `VULN-LOADIPFW-UNSIGNED-REGWRITE.md`. |
| `SVC 0xF2` `target_proc == 3` msg-check skip | Prior audit's verdict **re-verified and upheld**: `0x22E6-0x2300` requires caps bit7 **and** caller PCB type 1; a TA is type 5. |

### Hex-Rays caution (4th instance this project)
Decompiler output produced a plausible-but-false lead again (`buffer_copy_bounded`).
Every pointer/'"attacker-controlled" claim in this project should be confirmed against
raw disassembly before it is written down.