shader: do not dereference an unresolved descriptor address #459

Closed
github-bot wants to merge 1 commit from gh-pr/459/head into gh-pr/459/base
Owner

@⁠brandostrong on GitHub · 2026-09-02 21:49 UTC · original
brandostrong:fix/srt-unvalidated-descriptor-read → main · +6 −0 · 1 files · 1 commits · closed without merging

Problem. Evaluator::EvaluateRawRead reads a descriptor dword from guest memory. When no memory reader is installed it falls back to a raw memcpy from an address computed out of guest data, with no check. That path is live in normal draws, so a descriptor chain that does not resolve faults the emulator instead of failing the evaluation.

Change. Check readability of the address before the raw read and fail evaluation when it is not readable, matching what the reader-backed path already does.

Effect. No measured change in Astro Bot; this closes a host-crash path on any guest-derived address.

Verification. Suites pass; the unreadable-address case was exercised empirically during the Astro Bot runs.

References

  • No external specification. Correctness argument only: EvaluateRawRead reads from an address derived from guest data without a readability check when no memory reader is installed.
**@⁠brandostrong** on GitHub · 2026-09-02 21:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/459) `brandostrong:fix/srt-unvalidated-descriptor-read` → `main` · +6 −0 · 1 files · 1 commits · closed without merging **Problem.** `Evaluator::EvaluateRawRead` reads a descriptor dword from guest memory. When no memory reader is installed it falls back to a raw `memcpy` from an address computed out of guest data, with no check. That path is live in normal draws, so a descriptor chain that does not resolve faults the emulator instead of failing the evaluation. **Change.** Check readability of the address before the raw read and fail evaluation when it is not readable, matching what the reader-backed path already does. **Effect.** No measured change in Astro Bot; this closes a host-crash path on any guest-derived address. **Verification.** Suites pass; the unreadable-address case was exercised empirically during the Astro Bot runs. **References** - No external specification. Correctness argument only: `EvaluateRawRead` reads from an address derived from guest data without a readability check when no memory reader is installed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:21:57 +00:00
github-bot closed this pull request 2026-11-26 09:21:57 +00:00
Author
Owner

@⁠Nmzik on GitHub · 2026-10-21 19:42 UTC · original

Superseded by #473.

**@⁠Nmzik** on GitHub · 2026-10-21 19:42 UTC · [original](https://github.com/KytyPS5/KytyPS5/pull/459#issuecomment-6324939976) Superseded by #473.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.