kernel: core_hook: harden prctl handler
detection is done by comparing a 0xDEADBEEF call to a non-0xDEADBEEF one. which yeah, you will see that the non-0xDEADBEEF one returns early. yes I know this causes delays for all prctl calls, as we straight up check uid, but this keeps the delay consistent, which is what we want. another is that we only should only perform this recrowning logic for multiuser - temp fix for cimb octo's prctl abuse Co-authored-by: backslashxx <118538522+backslashxx@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,15 @@
|
||||
#include "ss/policydb.h"
|
||||
#include "linux/key.h"
|
||||
|
||||
|
||||
#if defined(CONFIG_ARM) || defined(CONFIG_ARM64)
|
||||
// arch/arm64/include/asm/barrier.h, adding dsb probably unneeded
|
||||
#define DONT_GET_SMART() do { barrier(); isb(); } while (0)
|
||||
#else
|
||||
// well, compiler atleast, and not our targets
|
||||
#define DONT_GET_SMART() barrier()
|
||||
#endif
|
||||
|
||||
/**
|
||||
* list_count_nodes - count the number of nodes in a list
|
||||
* @head: the head of the list
|
||||
|
||||
Reference in New Issue
Block a user