fix(libkernel): settimeofday and clock_settime crash the host on a pointer into unmapped memory #11370
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 xXPBSXx on 2026-10-26T09:22:06Z.
SetTimeOfDay_nid_no_patchreadstv->tv_usec,tv->tv_secand*tz, andclock_settime_nid_postfixreadstp->tv_nsecandtp->tv_sec, directly from the guest pointer. A pointer into unmapped memory crashes the host. FreeBSD 11.4 copies the structures in first and fails with EFAULT:copyinoftvandtzpinsys_settimeofday(sys/kern/kern_time.c:671 and 678) and oftpinsys_clock_settime(kern_time.c:390), before any argument check.This is the input side of #10975, which does the same for the output pointers of
gettimeofday,getitimerandsetitimer.AI-assisted (Claude Code).