freebsd-dev/sys/security/audit
Christian S.J. Peron 57274c513c Implement AUE_CORE, which adds process core dump support into the kernel.
This change introduces audit_proc_coredump() which is called by coredump(9)
to create an audit record for the coredump event.  When a process
dumps a core, it could be security relevant.  It could be an indicator that
a stack within the process has been overflowed with an incorrectly constructed
malicious payload or a number of other events.

The record that is generated looks like this:

header,111,10,process dumped core,0,Thu Oct 25 19:36:29 2007, + 179 msec
argument,0,0xb,signal
path,/usr/home/csjp/test.core
subject,csjp,csjp,staff,csjp,staff,1101,1095,50457,10.37.129.2
return,success,1
trailer,111

- We allocate a completely new record to make sure we arent clobbering
  the audit data associated with the syscall that produced the core
  (assuming the core is being generated in response to SIGABRT  and not
  an invalid memory access).
- Shuffle around expand_name() so we can use the coredump name at the very
  beginning of the coredump call.  Make sure we free the storage referenced
  by "name" if we need to bail out early.
- Audit both successful and failed coredump creation efforts

Obtained from:	TrustedBSD Project
Reviewed by:	rwatson
MFC after:	1 month
2007-10-26 01:23:07 +00:00
..
audit_arg.c - Add audit_arg_audinfo_addr() for auditing the arguments for setaudit_addr(2) 2007-06-27 17:01:15 +00:00
audit_bsm_klib.c Clean up audit comments--formatting, spelling, etc. 2007-06-01 21:58:59 +00:00
audit_bsm_token.c - Add audit_arg_audinfo_addr() for auditing the arguments for setaudit_addr(2) 2007-06-27 17:01:15 +00:00
audit_bsm.c Implement AUE_CORE, which adds process core dump support into the kernel. 2007-10-26 01:23:07 +00:00
audit_ioctl.h Don't expose #ifdef NOTYET parts to userspace via audit_ioctl.h, just 2007-04-29 16:20:32 +00:00
audit_pipe.c - Change the wakeup logic associated with having multiple sleepers 2007-10-12 15:09:02 +00:00
audit_private.h Clean up audit comments--formatting, spelling, etc. 2007-06-01 21:58:59 +00:00
audit_syscalls.c Merge first in a series of TrustedBSD MAC Framework KPI changes 2007-10-24 19:04:04 +00:00
audit_trigger.c Close a very narrow race that might cause a trigger allocation to be 2007-06-13 21:17:23 +00:00
audit_worker.c Rename the kthread_xxx (e.g. kthread_create()) calls 2007-10-20 23:23:23 +00:00
audit.c Implement AUE_CORE, which adds process core dump support into the kernel. 2007-10-26 01:23:07 +00:00
audit.h Implement AUE_CORE, which adds process core dump support into the kernel. 2007-10-26 01:23:07 +00:00