kern: reject shadow stack accesses in syscalls

This commit is contained in:
Alula committed 2026-09-15 17:04:50 +02:00
1 parent 7e58f5fbae
commit dbfe192b2f
15 files changed
+60 -29

No files matched your search

@@ -82,7 +82,7 @@ namespace ams::kern::svc {
/* Copy user handles. */
if (num_handles > 0) {
/* Ensure that we can try to get the handles. */
R_UNLESS(GetCurrentProcess().GetPageTable().Contains(KProcessAddress(user_handles.GetUnsafePointer()), num_handles * sizeof(ams::svc::Handle)), svc::ResultInvalidPointer());
R_UNLESS(GetCurrentProcess().GetPageTable().IsSafeUserPointer(KProcessAddress(user_handles.GetUnsafePointer()), num_handles * sizeof(ams::svc::Handle)), svc::ResultInvalidPointer());
/* Get the handles. */
R_TRY(user_handles.CopyArrayTo(handles, num_handles));