Files
AnyPS5/docs/dev/debt/changes/fix-libkernel-sys-setstackaddr-guest-attr.md
Mauro Alvarez 278d136d47 fix(libkernel_sys): read pthread_attr_setstackaddr attr safely
pthread_attr_setstackaddr dereferenced *attr directly on the host, so an unmapped or unreadable guest attribute pointer crashed the host instead of returning EINVAL (22).

Load the attribute handle through LoadAttr (GuestCopyIn_nid_no_patch with caller errno preserved) before checking stack_addr and updating stackAddress, matching pthread_attr_getsolosched_np and the pthread_attr affinity helpers.
2026-11-22 14:16:12 -03:00

768 B

libkernel_sys

change [pthread_attr_setstackaddr and pthread_attr_getsolosched_np]

  • pthread_attr_setstackaddr and pthread_attr_getsolosched_np (libkernel_sys) - firmware 13.60 libkernel_sys.sprx (SHA-256 60921322b155ba649cfa29ea5e6d358ca0229424b4f73fd5c30ae7f7ce7c304c) places pthread_attr_setstackaddr (NID suCrEbr0xIQ) at function address 0x4ed0 and pthread_attr_getsolosched_np (NID ApMLfJ527Ag) at 0x51b0. pthread_attr_setstackaddr reads attr through GuestCopyIn_nid_no_patch with caller errno preserved and returns EINVAL (22) when attr is unreadable, matching its null-pointer return as a host-safety fallback. Console runtime behaviour was not independently tested