mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-06 13:30:00 +00:00
These wrote their result through the caller's pointer in place, or read the itimerval of setitimer without a check, so a pointer into unmapped memory crashed the host. Build the result locally and copy it out with the checked write (and read the setitimer value with a checked read), failing with EFAULT as FreeBSD 11.4 does: copyout in sys_gettimeofday (sys/kern/kern_time.c:646 and 651) and sys_getitimer (kern_time.c:745), copyin (kern_time.c:803) and copyout (kern_time.c:808) in sys_setitimer. getrlimit and getrusage are left to #8986 and #8988, which cover the same family for those two calls. Builds on fix/output-structs-efault, which adds GuestCopyOut_nid_no_patch. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>