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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
|
# HDCP TA across 17 builds: the oldest image, and what never changed
Driven by the Windows-driver harvest. The oldest HDCP build we now hold is
**23.0.4.49**, from Adrenalin 22.12.1 (the RX 7900 launch driver, Dec 2022), with a
second same-version variant from 23.2.1.
Both were wrapped with `psp_out/mkelf.py` at base **`0x400100`** (the project's existing
TA convention, confirmed against `psp_out/vdiff/hdcp_23.0.0.49.elf`) into
`psp_out/versions_win/elf/` and opened in idatui (idalib): 100 functions, decompiler
working.
## Correction to my own count from the previous turn
I reported "8 new HDCP versions". That was **wrong — it is 5**. The comparison globbed
only `psp_out/versions/hdcp_*.bin` and missed `psp_out/versions_lfw/`, where blobs carry
hash-based names. Three of the "new" versions were already in the corpus, unidentified:
| version | was already at |
|---|---|
| 23.0.0.67 | `versions_lfw/hdcp_or_ras_cf9a78de22ebbfc6_28672.bin` |
| 23.0.0.73 | `versions_lfw/hdcp_or_ras_21f1a87cbade15b5_28672.bin` |
| 23.0.0.77 | `versions_lfw/hdcp_or_ras_9c61412eba2b1dd9_28672.bin` |
Genuinely new from the Windows train: **23.0.0.52, 23.0.0.57, 23.0.0.59, 23.0.4.49 (two
distinct images), 23.0.8.49**.
The harvest still pays for itself on those three: the Windows metadata **resolves the
`hdcp_or_ras_*` ambiguity**, naming them HDCP 23.0.0.67/.73/.77.
## Structure of the oldest build (23.0.4.49)
Info header at `0x400100`: `+0x10` entry `0x404514`, `+0x14` `'TA'`, `+0x1c` session
table `0x406000`, `+0x20` `&__stack_chk_guard` = **`0x4045a8`** (confirmed in the
prologue: `LDR.W R11, =dword_4045A8`).
`ta_entry_trampoline` (`0x404514`) dispatches on `request[0]` through pointers at
`0x4045b4..0x4045c4`:
```
1 -> TA_CreateEntryPoint 0x40139c
2 -> TA_DestroyEntryPoint 0x4013b0
3 -> TA_OpenSessionEntryPoint 0x4014e4 (returns 0)
4 -> TA_CloseSessionEntryPoint 0x401398
5 -> TA_InvokeCommandEntryPoint 0x4013b4 (4 args -- the real dispatcher)
```
`TA_InvokeCommandEntryPoint` requires `(paramTypes & 0xF) == 7`, a params buffer, and
`*(a4+4) >= 0x2818`, then switches on `msg[0]`: commands **1,2,3,4,5,6,7,9,0xB,0xC,0xE,
0xF,0x10,0x11,0x12,0x13**.
## The subcmd12 overflow shape is in every build, start to finish
`DISCLOSURE-SUMMARY.md` §1.2 describes the overflow as copying `5 * msg[2]` (a full
attacker byte) into the 504-byte `rx_ids`. Scanning for that shape — `add.w rX, rY, rY,
lsl #2` whose multiplier is a `ldrb` — across every HDCP build we hold:
| version | source | size | raw-byte x5 sites |
|---|---|---|---|
| 23.0.0.49 | linux | 0x6000 | 0x402eb0, 0x402ffe, 0x403054, 0x4031d4 |
| 23.0.4.49 | **win (oldest)** | 0x6000 | 0x402eb0, 0x402ffe, 0x403054, 0x4031d4 |
| 23.0.8.49 | win | 0x6000 | 0x402eb0, 0x402ffe, 0x403054, 0x4031d4 |
| 23.0.0.52 | win | 0x6000 | 0x402eb0, 0x403006, 0x403062, 0x4031f0 |
| 23.0.0.55 | linux | 0x6000 | same as .52 |
| 23.0.0.57 | win | 0x6000 | 0x402a90, 0x402be6, 0x402c42, 0x402dd0 |
| 23.0.0.58 | linux | 0x6000 | same as .57 |
| 23.0.0.59 | win | 0x6000 | 0x402b18, 0x402c6e, 0x402cca, 0x402e58 |
| 23.0.0.62 | linux | 0x6000 | same as .59 |
| 23.0.0.64/.65/.66 | linux | 0x6000 | 0x402b24, 0x402c7a, 0x402cd6, 0x402e64 |
| 23.0.0.67/.70/.73/.77/.82 | mixed | 0x7000 | 0x402b24, 0x402c7a, 0x402cd6, 0x402e64 |
**Exactly four raw-byte `x5` sites in all 17 builds** — from the Dec 2022 launch image to
the newest we hold. The count never drops, the sites only shift with code motion, and the
addresses freeze once the layout stabilises at `.64`. **The pattern was never fixed.**
So the answer to "was this a regression introduced later" is **no** — it is present in
the oldest HDCP image AMD shipped for this card. (My first reading of the oldest build
suggested a fix, because I landed on `0x402f20 ubfx r6, r0, #4, #5` — a genuinely bounded
5-bit `DEVICE_COUNT` path. Both a bounded and an unbounded path coexist in *every* build,
so picking one site at random gives either answer; only the full enumeration settles it.)
The `23.0.4.49` / `23.0.8.49` branch builds share `23.0.0.49`'s site addresses exactly,
so those branches fork from the `.49` codebase.
## Artifacts
`psp_out/versions_win/elf/hdcp_23.0.4.49_{543e8a45,0478f2fb}.elf`. The idatui database
carries the entry-point map, command dispatch table and a function comment on the RxInfo
handler recording the four sites and the bounded/unbounded coexistence.
## Is the stack canary present in every build? Yes — and it covers the vulnerable function
The overflow is rated DoS-grade because `__stack_chk_fail` catches it. That rating only
holds if the canary exists in every build, so it was checked across all 17:
| | result |
|---|---|
| guard declared in the info header (`+0x20`) | **17/17**, at a build-specific address (`0x4041f8` .. `0x4045e8`) |
| guard address present in the literal pool | 10-11 occurrences per build |
| functions loading the guard | **20-21 per build**, stable across the whole history |
| raw-byte `x5` sites inside a guard-loading function | **4/4 in every build** |
The prologue load is the same instruction the disassembly shows for the oldest image
(`0x402e1c LDR.W R11, =dword_4045A8`, third instruction of the RxInfo handler), and in
each build it sits immediately before the function containing all four sites:
```
23.0.0.49 / 23.0.4.49 / 23.0.8.49 / .52 / .55 : prologue load 0x402e1c
23.0.0.57 / .58 : 0x4029fc
23.0.0.59 / .62 : 0x402a84
23.0.0.64 .. 23.0.0.82 : 0x402a90
```
So the canary was never absent, and there is no build in this range where the overflow
would be un-gated. The guard is also **loader-initialised** (`GUARD-INIT-CHAIN.md`: the
TA declares the slot address at header `+0x20`, sOS patches the value at process
creation), so it is not the image placeholder in any of them.
**Evidence strength, stated honestly:** "guard present + vulnerable function loads it" is
established for all 17 by static scan. That the *epilogue actually traps* is confirmed
directly only for `23.0.0.82` — on hardware, the overflow faults in `__stack_chk_fail`
(PC `0x40433c`, FAR `0xdeadbeef`) — and by decompilation for the oldest build. The
uniform prologue pattern across the series makes the same conclusion very likely
elsewhere, but it is an inference, not a per-build measurement.
Consequence: the DoS rating holds across the entire shipped history, and the escalation
path is the same in every build — it needs a canary leak, which is exactly why the ASD
`0x202` disclosure mattered and why its unreachability (three independent axes) matters.
|