From 7fb0bd14a53f3c8cef748cabebc6e99ab1bf30fd Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sun, 6 Jan 2019 18:33:27 +0000 Subject: 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@ --- sys/kern/kern_unveil.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/kern/kern_unveil.c') 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 @@ -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 -- cgit v1.2.3