Date: Sun, 18 Jul 2021 00:51:48 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: f40b0295b5c6 - stable/12 - procctl(PROC_ASLR_STATUS): fix vmspace leak Message-ID: <202107180051.16I0pmR5075797@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f40b0295b5c6ef73f1560459b44f39d46ad67e00 commit f40b0295b5c6ef73f1560459b44f39d46ad67e00 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-07-14 23:40:04 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-07-18 00:30:31 +0000 procctl(PROC_ASLR_STATUS): fix vmspace leak (cherry picked from commit 0bdb2cbf9d7c4366a0668b4563c8630538a50086) --- sys/kern/kern_procctl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index 6e841b0fcaaa..c87f2bd060ca 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -463,8 +463,9 @@ aslr_status(struct thread *td, struct proc *p, int *data) _PHOLD(p); PROC_UNLOCK(p); vm = vmspace_acquire_ref(p); - if (vm != NULL && (vm->vm_map.flags & MAP_ASLR) != 0) { - d |= PROC_ASLR_ACTIVE; + if (vm != NULL) { + if ((vm->vm_map.flags & MAP_ASLR) != 0) + d |= PROC_ASLR_ACTIVE; vmspace_free(vm); } PROC_LOCK(p);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107180051.16I0pmR5075797>