Check vplabel for NULL before dereferencing it. Fixes a panic
when running atop with MAC_MLS enabled. Submitted by: Richard Kojedzinszky <krichy@tvnetwork.hu> Reviewed by: rwatson MFC after: 1 week
This commit is contained in:
parent
99fb123f8d
commit
e623c22083
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234957
|
@ -2028,6 +2028,9 @@ mls_system_check_acct(struct ucred *cred, struct vnode *vp,
|
|||
if (!mls_enabled)
|
||||
return (0);
|
||||
|
||||
if (vplabel == NULL)
|
||||
return (0);
|
||||
|
||||
subj = SLOT(cred->cr_label);
|
||||
obj = SLOT(vplabel);
|
||||
|
||||
|
|
Loading…
Reference in New Issue