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
@ -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
Block a user