kern: add new KCapability checks before creating process

This commit is contained in:
Michael Scire authored and SciresM committed 2022-03-23 09:10:50 -07:00
1 parent 14e768cd10
commit 8cb3cfd835
3 files changed
+48 -5

No files matched your search

@@ -192,6 +192,9 @@ namespace ams::kern::svc {
const bool is_application = (params.flags & ams::svc::CreateProcessFlag_IsApplication) != 0;
R_UNLESS(!optimize_allocs || is_application, svc::ResultBusy());
/* Check that the user-provided capabilities are accessible and refer to valid regions. */
R_TRY(KCapabilities::CheckCapabilities(user_caps, num_caps));
/* Get the current handle table. */
auto &handle_table = GetCurrentProcess().GetHandleTable();