audit_log_execve_info() wants to read the program's arguments directly from user memory; to perform the uaccess we therefore need to create a valid user pointer from the address of the arguments.
uaddr_to_user_ptr_safe() should no longer be used for that purpose. Instead, we use make_user_ptr_for_read_uaccess() to create a user pointer with appropriate bounds and permissions (in PCuABI).
Signed-off-by: Kevin Brodsky kevin.brodsky@arm.com --- kernel/auditsc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index a136fb44180c..d66ebe85eff8 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c @@ -1129,7 +1129,8 @@ static void audit_log_execve_info(struct audit_context *context, unsigned int arg; char *buf_head; char *buf; - const char __user *p = uaddr_to_user_ptr_safe(current->mm->arg_start); + const char __user *p = make_user_ptr_for_read_uaccess( + current->mm->arg_start, MAX_EXECVE_AUDIT_LEN);
/* NOTE: this buffer needs to be large enough to hold all the non-arg * data we put in the audit record for this argument (see the