PERFORCE change 187059 for review
Efstratios Karatzas
gpf at FreeBSD.org
Sun Dec 19 18:03:20 UTC 2010
http://p4web.freebsd.org/@@187059?ac=10
Change 187059 by gpf at gpf_desktop on 2010/12/19 18:02:50
bugfix: audit_new() may return NULL and audit_proc_coredump() was
lacking a check for that. I was able to trigger a pagefault by
shutting down audit but only if I did that within the first few
seconds after the system had done booting up. Anyhoo, it's fixed
now.
Affected files ...
.. //depot/projects/soc2010/gpf_audit/freebsd/src/sys/security/audit/audit.c#16 edit
Differences ...
==== //depot/projects/soc2010/gpf_audit/freebsd/src/sys/security/audit/audit.c#16 (text) ====
@@ -1153,6 +1153,12 @@
*/
td->td_pflags |= TDP_AUDITREC;
ar = audit_new(AUE_CORE, td);
+ if (ar == NULL) {
+ audit_commit(td->td_ar);
+ td->td_pflags &= ~TDP_AUDITREC;
+ td->td_ar = NULL;
+ return;
+ }
if (path != NULL) {
pathp = &ar->k_ar->ar_arg_upath1;
*pathp = malloc(MAXPATHLEN, M_AUDITPATH, M_WAITOK);
More information about the p4-projects
mailing list