fix(libSceAgcDriver): validate PM4 index base and indirect draw count address bounds #14110
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14110"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by slopgobblercobbler on 2026-10-31T19:16:50Z.
What
Validates index base alignment and address space bounds in PM4 opcode 0x26 (
INDEX_BASE), requiring 2-byte alignment and upper 16-bit address bounds (packet[2] <= 0xffffu). Also validates 48-bit address space bounds on indirect multi-draw count buffer addresses (packet[7] <= 0xffffu) in opcodes 0x2c and 0x38.Tested
python tools/check_conventions.py --base upstream/main --head HEAD(0 findings)core/libs/prx/libSceAgcDriver/tests/Pm4.cppcovering misaligned index base addresses, high address bits inINDEX_BASE, and out-of-bounds indirect multi-draw count buffer addresses on both 0x2c and 0x38.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-31T19:32:23Z.
Review: APPROVED
Reviewed — looks good
The PM4 validation changes reject misaligned or out-of-range addresses, and the exact-head Windows job passes all 14 selected PM4 tests.
What I ran
Reviewed head
812b91f65b7f0cbfbcf4c9c3b66825c7d22e4182against basef14ae07e2961a7f033b1c8e6e9c0de8514eefa94; GitHub reports the PR mergeable. Environment: Linux 6.1.0-54-amd64, Python 3.11.2, GCC 12.2.0. No local build was run.Results
agc_driver_pm4.Unedited relevant Windows log output
Unedited relevant precheck output
Sources
Not verified
I did not run the C++ tests locally or test on Linux, a GPU, or a PS5 console. The Windows hosted job passed for this exact head.