archctl: boundary check

This commit is contained in:
Matheus
2025-12-05 18:20:09 -03:00
parent 40bbf217ee
commit 64d078c654
+5
View File
@@ -17,6 +17,11 @@ syscallret_t syscall_archctl(context_t *context, int func, void *arg) {
.ret = 0
};
if (!IS_USER_ADDRESS(arg)) {
ret.errno = EFAULT;
return ret;
}
switch (func) {
case ARCH_CTL_SET_GSBASE:
// kernelgsbase because it will be switched out to user