diff options
| author | Simon J. Gerraty <sjg@FreeBSD.org> | 2025-05-16 22:19:06 +0000 |
|---|---|---|
| committer | Simon J. Gerraty <sjg@FreeBSD.org> | 2025-05-16 22:19:06 +0000 |
| commit | 496b3c3a1ce86b72f56bec993b76bdd64723ee46 (patch) | |
| tree | 5e39c0850e2462df9fac223c7035ced1cc5e8f72 | |
| parent | 95c414dd27c26285cdd6ed4288832b3db0ea6628 (diff) | |
| -rw-r--r-- | sys/security/mac_grantbylabel/mac_grantbylabel.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/security/mac_grantbylabel/mac_grantbylabel.c b/sys/security/mac_grantbylabel/mac_grantbylabel.c index af080e8e34e0..c40885773222 100644 --- a/sys/security/mac_grantbylabel/mac_grantbylabel.c +++ b/sys/security/mac_grantbylabel/mac_grantbylabel.c @@ -409,6 +409,10 @@ cleanup_file: proc = pfind(gbl_args.u.pid); if (proc == NULL) return (EINVAL); + else if (proc->p_textvp == NULL) { + PROC_UNLOCK(proc); + return (EINVAL); + } proc_locked = 1; } gbl_args.gbl = (SLOT(proc->p_textvp->v_label) | |
