libkernel: getlogin_r and SetLogin fault on invalid memory pointers #13567
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 pushkarreddyy on 2026-10-30T18:30:30Z.
Environment
0a90776f7f(main)Describe the bug
getlogin_r_nid_postfixandSetLogin_nid_no_patchdirectly 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 returning14(EFAULT).Expected behavior
getlogin_r_nid_postfixandSetLogin_nid_no_patchshould safely validate guest pointers viaGuestCopyOut_nid_no_patchandGuestCopyIn_nid_no_patch, returning14(EFAULT) when a pointer is inaccessible.