mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
audit: free proctitle in context so it can be re-set by fork on exec_binprm
Between the actual process startup (fork systemd) and the executable file replacement (exec), systemd sets a temporary file name (executable file name in parentheses). If an auditable system call occurs at this point, the audit context will latch the temporary process name into the cache. This name will not change again. The patch clears proctitle into the audit cache when the exec call is made, allowing the new process name to be latched. Suggested-by: Roman Dolgikh <rmd4work@mail.ru> Link: https://github.com/linux-audit/audit-kernel/issues/170 Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Reviewed-by: Ricardo Robaina <rrobaina@redhat.com> Reviewed-by: Bradley Morgan <include@grrlz.net> Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
cee9395acd
commit
b09cfc1618
|
|
@ -2601,6 +2601,8 @@ void __audit_bprm(struct linux_binprm *bprm)
|
|||
{
|
||||
struct audit_context *context = audit_context();
|
||||
|
||||
/* clear proctitle in audit context to allow replacement */
|
||||
audit_proctitle_free(context);
|
||||
context->type = AUDIT_EXECVE;
|
||||
context->execve.argc = bprm->argc;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user