Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Dec 2010 18:03:20 GMT
From:      Efstratios Karatzas <gpf@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 187059 for review
Message-ID:  <201012191803.oBJI3Kps083181@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@187059?ac=10

Change 187059 by gpf@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012191803.oBJI3Kps083181>