kernel: Fixed potential null pointer issue with current->mm in kernel version 5.10
When calling get_full_comm() within system call hooks, current->mm may be null (prctl). A fallback mechanism for current->comm must be added beforehand to prevent null pointer dereferences when accessing mm->arg_start/arg_end. Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
@@ -4,11 +4,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/version.h>
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 245)
|
||||
#define __SULOG_GATE 1
|
||||
#else
|
||||
#define __SULOG_GATE 0
|
||||
#endif
|
||||
|
||||
#if __SULOG_GATE
|
||||
extern struct timezone sys_tz;
|
||||
|
||||
Reference in New Issue
Block a user