aboutsummaryrefslogtreecommitdiffstats
path: root/fw/libdumps/merit.json (follow)
Commit message (Collapse)AuthorAge
* LEAD: MERIT cmd05 compares with an unbounded host length; gated on hardwareuser2026-09-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | merit_cmd05 validates its slot index and presence byte correctly, then loads a length from params+0x4c and passes it to merit_lib_52b900d8_88, which is memcmp, verified from its body. There is no compare on that length anywhere in the function; the only bounds are the index, the loop counter and the memcmp result. Why it would matter: the table is nine 16-byte entries in the image, so its contents are known to anyone holding the firmware, and the slot array at 0x415004 sits just past the 0x15000-byte image, so a length near 0x13000 would compare from known bytes into live slot memory with only equality consumed, which is the standard byte-at-a-time extension. Hardware says the compare is not reached. After allocating a slot with cmd01, cmd05 returns an identical response for lengths from 0x10 to 0x13000 and for a correct table entry versus garbage; a full-page diff shows only my own input bytes differing, and MERIT's status at params+8 is 0x105 in every case. Identical responses for a correct entry and for garbage prove the memcmp never ran. The rejection comes from an earlier gate, either the helper call or the check that params+0x44 equals a value read from slot+33..36, which requires the caller to know slot-resident content. Filed as a lead: the dangerous half is verified statically, the reachable half is measured to fail, and the next step is checking whether those gate values are host-settable. Also noted that MERIT was previously cleared on the strength of merit_cmd04 alone while merit_cmd05, flagged by the same detector, had not been read until now.
* fw: annotation coverage 65% -> 82%; POWERPLAY's fptr table found and nameduser2026-09-29
| | | | | | | | | | | | | | | | | | Ran the call-graph attribution pass on the nine TAs that had not had it, then attacked the worst outlier. POWERPLAY sat at 51% because 37 of its functions have no direct caller; scanning for runs of valid Thumb pointers into the image found a 23-entry function-pointer table at 0x40266c, alongside the 5-entry TEE table at 0x406c44 which matches the trampoline and therefore serves as the control. Naming the 23 targets by table index, which is factual rather than guessed semantics, took POWERPLAY from 51 to 73 percent, and re-running attribution took it to 74. Overall coverage is now 533 of 622 functions, 82 percent, up from 65. Per-TA it ranges from 74 percent on POWERPLAY to 92 percent on several of the small ones. What remains unnamed is stated rather than glossed: functions with several named owners, where attributing one would be wrong, and functions reached only indirectly in TAs where no pointer table was located. The objective's literal everything is still not met and the number is the evidence.
* fw: propagate shared-runtime names by content hash; coverage 38% -> 61%user2026-09-29
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.