From ee88d605b6cb1ddcfbe580130953f8786cd91ac2 Mon Sep 17 00:00:00 2001 From: deraadt Date: Tue, 13 Oct 2015 18:38:34 +0000 Subject: [PATCH] NET_RT_FLAGS must also accept a proto selection. --- sys/kern/kern_pledge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index af54fb7dd01..2e603de7d89 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.19 2015/10/13 16:09:24 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.20 2015/10/13 18:38:34 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -852,7 +852,8 @@ pledge_sysctl_check(struct proc *p, int miblen, int *mib, void *new) if (miblen == 7 && /* exposes MACs */ mib[0] == CTL_NET && mib[1] == PF_ROUTE && - mib[2] == 0 && mib[3] == AF_INET && + mib[2] == 0 && + (mib[3] == 0 || mib[3] == AF_INET6 || mib[3] == AF_INET) && mib[4] == NET_RT_FLAGS && mib[5] == RTF_LLINFO) return (0); } -- 2.20.1