libkernel: getlogin_r and SetLogin fault on invalid memory pointers #13567

Closed
opened 2026-10-30 18:30:30 +00:00 by pushkarreddyy · 0 comments
pushkarreddyy commented 2026-10-30 18:30:30 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-30T18:30:30Z.


Environment

  • AnyPS5 commit: 0a90776f7f (main)
  • Title: PS5 system software / login session callers

Describe the bug

getlogin_r_nid_postfix and SetLogin_nid_no_patch directly read from and write to guest memory pointers without guest copy safety checks. When called with non-null unwritable output memory or an unreadable name pointer, the host crashes with a segmentation fault (SIGSEGV) instead of returning 14 (EFAULT).

Expected behavior

getlogin_r_nid_postfix and SetLogin_nid_no_patch should safely validate guest pointers via GuestCopyOut_nid_no_patch and GuestCopyIn_nid_no_patch, returning 14 (EFAULT) when a pointer is inaccessible.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6124833650 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/13567). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-30T18:30:30Z. --- ### Environment - AnyPS5 commit: 0a90776f7f (main) - Title: PS5 system software / login session callers ### Describe the bug `getlogin_r_nid_postfix` and `SetLogin_nid_no_patch` directly read from and write to guest memory pointers without guest copy safety checks. When called with non-null unwritable output memory or an unreadable name pointer, the host crashes with a segmentation fault (`SIGSEGV`) instead of returning `14` (`EFAULT`). ### Expected behavior `getlogin_r_nid_postfix` and `SetLogin_nid_no_patch` should safely validate guest pointers via `GuestCopyOut_nid_no_patch` and `GuestCopyIn_nid_no_patch`, returning `14` (`EFAULT`) when a pointer is inaccessible.
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#13567
No description provided.