syscalls: misc vulnerability fixes

This commit is contained in:
Matheus
2026-04-28 21:27:51 -03:00
parent 02a47c8303
commit 42cec91cb9
6 changed files with 13 additions and 8 deletions
+2 -4
View File
@@ -12,15 +12,13 @@ syscallret_t syscall_clockget(context_t *, int clockid, timespec_t *tp) {
switch (clockid) {
case CLOCK_REALTIME: {
timespec_t ts = timekeeper_time();
usercopy_touser(tp, &ts, sizeof(timespec_t));
ret.errno = 0;
ret.errno = usercopy_touser(tp, &ts, sizeof(timespec_t));
break;
}
case CLOCK_MONOTONIC:
case CLOCK_BOOTTIME: {
timespec_t ts = timekeeper_timefromboot();
usercopy_touser(tp, &ts, sizeof(timespec_t));
ret.errno = 0;
ret.errno = usercopy_touser(tp, &ts, sizeof(timespec_t));
break;
}
default: {