summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-01-06 18:33:27 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-01-06 18:33:27 +0000
commit7fb0bd14a53f3c8cef748cabebc6e99ab1bf30fd (patch)
treebd631ac26207036a5631834181a6252e6a313cd6 /sys/kern
parenta1179cda5ed0ed93220e0410c3abbe3c0aa975fe (diff)
Clear ps_uvpcwd when we free ps_uvpaths. Fixes a crash seen by kn@ and me
where ps_uvpcwd obviously contains a dangling pointer. ok deraadt@, krw@
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_unveil.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/kern_unveil.c b/sys/kern/kern_unveil.c
index a6386a07ad1..ce4f4a34ce7 100644
--- a/sys/kern/kern_unveil.c
+++ b/sys/kern/kern_unveil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_unveil.c,v 1.18 2019/01/03 21:52:31 beck Exp $ */
+/* $OpenBSD: kern_unveil.c,v 1.19 2019/01/06 18:33:26 kettenis Exp $ */
/*
* Copyright (c) 2017-2018 Bob Beck <beck@openbsd.org>
@@ -198,6 +198,7 @@ unveil_destroy(struct process *ps)
sizeof(struct unveil));
ps->ps_uvvcount = 0;
ps->ps_uvpaths = NULL;
+ ps->ps_uvpcwd = NULL;
}
void