Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-8]: src/sys/dist/pf/net Pull up following revision(s) (requested ...



details:   https://anonhg.NetBSD.org/src/rev/b3720f05c0fd
branches:  netbsd-8
changeset: 434666:b3720f05c0fd
user:      snj <snj%NetBSD.org@localhost>
date:      Mon Feb 26 00:33:08 2018 +0000

description:
Pull up following revision(s) (requested by alnsn in ticket #570):
        sys/dist/pf/net/pf.c: 1.79-1.80
PR/53036: Alexander Nasonov: 'block user' in pf's ruleset panics 8.0_BETA
Check for NULL.
--
It is normal for socket credentials to be missing for incoming sockets,
so don't warn.

diffstat:

 sys/dist/pf/net/pf.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 08a3c7799186 -r b3720f05c0fd sys/dist/pf/net/pf.c
--- a/sys/dist/pf/net/pf.c      Mon Feb 26 00:29:27 2018 +0000
+++ b/sys/dist/pf/net/pf.c      Mon Feb 26 00:33:08 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pf.c,v 1.76.6.1 2018/02/10 04:12:17 snj Exp $  */
+/*     $NetBSD: pf.c,v 1.76.6.2 2018/02/26 00:33:08 snj Exp $  */
 /*     $OpenBSD: pf.c,v 1.552.2.1 2007/11/27 16:37:57 henning Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.76.6.1 2018/02/10 04:12:17 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.76.6.2 2018/02/26 00:33:08 snj Exp $");
 
 #include "pflog.h"
 
@@ -2847,6 +2847,8 @@
                break;
 #endif /* INET6 */
        }
+       if (so == NULL || so->so_cred == NULL)
+               return -1;
        pd->lookup.uid = kauth_cred_geteuid(so->so_cred);
        pd->lookup.gid = kauth_cred_getegid(so->so_cred);
 #else



Home | Main Index | Thread Index | Old Index