This repository was archived by the owner on Jan 6, 2025. It is now read-only.
This repository was archived by the owner on Jan 6, 2025. It is now read-only.
segfault in mprotect #132
Open
Description
trying to mark mprotect as not avail.
ubuntu 22.04, x86-64.
below will segfault.
#include <libsyscall_intercept_hook_point.h>
#include <syscall.h>
#include <errno.h>
static int
hook(long syscall_number,
long arg0, long arg1,
long arg2, long arg3,
long arg4, long arg5,
long *result)
{
if (syscall_number == SYS_mprotect) {
*result = -ENOTSUP;
return 0;
} else {
return 1;
}
}
static __attribute__((constructor)) void
init(void)
{
intercept_hook_point = hook;
}
Metadata
Metadata
Assignees
Labels
No labels