]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
audit_canon_path_vp: don't panic if cdir == NULL
authorKyle Evans <kevans@FreeBSD.org>
Fri, 17 Apr 2020 02:09:31 +0000 (02:09 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Fri, 17 Apr 2020 02:09:31 +0000 (02:09 +0000)
commitcc62118e659ea041859441010a9669e8c98fb0c1
tree453885f796dfedab400bd17880d643295c65b2f2
parent4d0b267a1f3d8c4775526f8aaa0963bdc2d40814
audit_canon_path_vp: don't panic if cdir == NULL

cdir may have simply failed to resolve (e.g. fget_cap failure in namei
leading to NULL dp passed to AUDIT_ARG_UPATH*_VP); restore the pre-rS358191
behavior of setting cpath[0] = '\0' and bailing out instead of panicking.

This was found by inadvertently running the libc/c063 tests with auditing
enabled, resulting in a panic.

Reviewed by: mjg (committed version actually his)
Differential Revision: https://reviews.freebsd.org/D24445
sys/security/audit/audit_bsm_klib.c