Commit 9410d228 authored by Committed by Eric Paris
audit: call audit_bprm() only once to add AUDIT_EXECVE information
Move the audit_bprm() call from search_binary_handler() to exec_binprm(). This allows us to get rid of the mm member of struct audit_aux_data_execve since bprm->mm will equal current->mm. This also mitigates the issue that ->argc could be modified by the load_binary() call in search_binary_handler(). audit_bprm() was being called to add an AUDIT_EXECVE record to the audit context every time search_binary_handler() was recursively called. Only one reference is necessary. Reported-by: Oleg Nesterov <firstname.lastname@example.org> Cc: Eric Paris <email@example.com> Signed-off-by: Richard Guy Briggs <firstname.lastname@example.org> Signed-off-by: Eric Paris <email@example.com> --- This patch is against 3.11, but was developed on Oleg's post-3.11 patches that introduce exec_binprm().
Showing with 4 additions and 15 deletions