From bd36db46a06918bb5d02d51f61b49bad50567256 Mon Sep 17 00:00:00 2001 From: opa334 Date: Sat, 24 Feb 2024 23:16:56 +0100 Subject: [PATCH] I'm not sure why this would fix things but it seems like it does --- BaseBin/systemhook/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseBin/systemhook/src/main.c b/BaseBin/systemhook/src/main.c index 2b7307264..19d2c5401 100644 --- a/BaseBin/systemhook/src/main.c +++ b/BaseBin/systemhook/src/main.c @@ -334,7 +334,7 @@ int csops_hook(pid_t pid, unsigned int ops, void *useraddr, size_t usersize) int rv = syscall(SYSCALL_CSOPS, pid, ops, useraddr, usersize); if (rv != 0) return rv; if (ops == CS_OPS_STATUS) { - if (useraddr) { + if (useraddr && usersize == sizeof(uint32_t)) { uint32_t* csflag = (uint32_t *)useraddr; *csflag |= CS_VALID; *csflag &= ~CS_DEBUGGED; @@ -348,7 +348,7 @@ int csops_audittoken_hook(pid_t pid, unsigned int ops, void *useraddr, size_t us int rv = syscall(SYSCALL_CSOPS_AUDITTOKEN, pid, ops, useraddr, usersize, token); if (rv != 0) return rv; if (ops == CS_OPS_STATUS) { - if (useraddr) { + if (useraddr && usersize == sizeof(uint32_t)) { uint32_t* csflag = (uint32_t *)useraddr; *csflag |= CS_VALID; *csflag &= ~CS_DEBUGGED;