libSceWebBrowserDialog: dialog result and cookie operations fault on unwritable pointers instead of returning COMMON_DIALOG_ERROR_ARG_NULL #16044

Closed
opened 2026-11-05 12:52:59 +00:00 by pushkarreddyy · 0 comments
pushkarreddyy commented 2026-11-05 12:52:59 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-11-05T12:52:59Z.


What happens

In core/libs/prx/libSceWebBrowserDialog/Export.cpp, sceWebBrowserDialogGetResult, sceWebBrowserDialogSetCookie, and sceWebBrowserDialogResetCookie directly dereference caller-supplied pointer arguments (result->reserved, result->extended, result->result, param->size, etc.) without checking memory readability or writability.

When a guest title passes an unwritable or unmapped pointer (such as 0x10), host memory access triggers an unhandled memory fault / segmentation fault instead of safely returning COMMON_DIALOG_ERROR_ARG_NULL (0x80B8000D).

Proposed Fix

  1. Validate memory accessibility and copy guest buffers using GuestCopyIn_nid_no_patch and GuestCopyOut_nid_no_patch in sceWebBrowserDialogGetResult, sceWebBrowserDialogSetCookie, and sceWebBrowserDialogResetCookie.
  2. Return COMMON_DIALOG_ERROR_ARG_NULL (0x80B8000D) when guest pointer access fails.
  3. Add guest regression test coverage in core/libs/tests/GuestWebBrowserDialog.cpp.
  4. Document the host-safety fallback in docs/dev/debt/libSceWebBrowserDialog.md.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6223560575 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/16044). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-11-05T12:52:59Z. --- ### What happens In `core/libs/prx/libSceWebBrowserDialog/Export.cpp`, `sceWebBrowserDialogGetResult`, `sceWebBrowserDialogSetCookie`, and `sceWebBrowserDialogResetCookie` directly dereference caller-supplied pointer arguments (`result->reserved`, `result->extended`, `result->result`, `param->size`, etc.) without checking memory readability or writability. When a guest title passes an unwritable or unmapped pointer (such as `0x10`), host memory access triggers an unhandled memory fault / segmentation fault instead of safely returning `COMMON_DIALOG_ERROR_ARG_NULL` (`0x80B8000D`). ### Proposed Fix 1. Validate memory accessibility and copy guest buffers using `GuestCopyIn_nid_no_patch` and `GuestCopyOut_nid_no_patch` in `sceWebBrowserDialogGetResult`, `sceWebBrowserDialogSetCookie`, and `sceWebBrowserDialogResetCookie`. 2. Return `COMMON_DIALOG_ERROR_ARG_NULL` (`0x80B8000D`) when guest pointer access fails. 3. Add guest regression test coverage in `core/libs/tests/GuestWebBrowserDialog.cpp`. 4. Document the host-safety fallback in `docs/dev/debt/libSceWebBrowserDialog.md`.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#16044
No description provided.