| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The last 14% cannot be named without inventing semantics for code that is either
shared by several owners or reachable only indirectly, so it is documented instead.
fw/ta_document_residue.py writes an IDA function comment on each still-anonymous
function giving size, callers, callees and a class, all derived from IDA's function
boundaries plus a capstone decode of that function.
Four evidence-based classes: several named owners, no named caller and not
data-referenced, no bl caller but data-referenced, and called only from
still-anonymous code.
Applied to all twelve TAs: 78 functions documented, with powerplay 27, xgmi 14,
wspe 9, gcp 8, opm 6, fp 5, merit 4, auc 3, oc 1, csu 1, and rap and tmz having
none left. Spot-verified by reading the comment back in two separate databases.
Also corrects the coverage figures: the live counts used names <prefix>_ which
misses IDA's start label in every TA, so each named count was one low. With start
included the named total is 554 of 632, and with the residue documented every one of
the 632 functions carries either a derived name or a factual comment.
That is the defensible reading of fully annotated, since a semantic name for all 632
is not achievable for indirect or dead code without fabricating meaning.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ST+HW]
New object-lifetime defect in GCP, a TA that is loadable and invokable on this
card and was absent from linux-firmware entirely.
GCP keeps a context-wide session refcount at ctx+0x1E00, incremented by the three
create paths and decremented by the destroys, with the zero transition calling
gcp_asd_rpc_305(2), the ASD-side release paired with the 305(1) acquire. FE0D
validates the caller's handle with an ITTE block and then falls through to the
decrement and release on both outcomes, so a rejected handle still costs a
decrement and, at zero, an early ASD release. Its sibling FE0B branches away on a
bad handle and skips that code entirely; two destroy handlers of the same shape
differing exactly on whether the refcount work is guarded is what makes this a
defect rather than a design choice.
The only gate on the handle is the range check handle>>30==0, so any value below
0x40000000 that does not match a slot is rejected and still decrements. CBZ stops
the counter at zero, so the effect is desync and premature release rather than a
wrap.
Hardware confirms the asymmetry with the sibling as control: FE0D with handle
0x01234567 returns 0x2000002f, which is only produced after gcp_asd_rpc_305(2) is
called and fails, while FE0B with an equally invalid handle returns plain 0x100
and never reaches that code.
Limits stated: the run starts with the count at zero because creating a live
session needs ASD 305(1) to succeed and it fails without real DRM state, the same
gate that blocks the 0x202 disclosure, so what is proven is entry into the
decrement/release path on a rejected handle rather than a decrement from a
positive count. Downstream impact lives inside ASD, which this rig cannot observe.
Also recorded as a negative: GCP's three session arrays tile the context exactly
with correct bounds on every index, slot counts taken from the creation loops'
own terminators, so this finding is about the refcount and not about indexing.
|
|
|
These TAs share one PSP TEE runtime, so the same helper appears byte-identical in
several of them. fw/ta_libmatch.py dumps IDA's function list per TA, hashes each
function's bytes, and clusters across TAs: 628 functions, 457 distinct bodies, 55
clusters shared by two or more TAs covering 225 instances. Naming a cluster once
and propagating by exact content match is much better leverage than renaming
anonymous functions individually.
The clustering reproduces known answers before being trusted for unknown ones: the
148-byte cluster shared by eight TAs is exactly the entry trampoline already named
from the header parse, and the 2- and 4-byte clusters are the return stubs already
named as the close-session and destroy entry points.
Naming discipline kept deliberately tight. Only six clusters got semantic names,
the ones whose disassembly proves them: a word-block zero fill present in ten TAs,
a bytewise zero fill with alignment fixup in six, the two return stubs, the
trampoline and a tail-jump thunk. The other 49 are tagged lib_<hash>_<size>, which
records that they are shared runtime rather than TA-specific logic without
inventing semantics; several look like a stream or vtable family but probably is
not a name.
Coverage rises from 38 to 61 percent. The remainder is TA-specific internal logic
and is stated as unnamed.
|