⬢ DragonFlyBSD Kernel Audit
DF-3297 / fix.diff
← back to finding ↓ download raw
--- sys/net/pf/pf_ioctl.c
+++ sys/net/pf/pf_ioctl.c
@@ -2881,6 +2881,11 @@ pfioctl(struct dev_ioctl_args *ap)
 
 			bcopy(n, pstore, sizeof(*pstore));
 			if (n->rule.ptr != NULL)
 				pstore->rule.nr = n->rule.ptr->nr;
+			bzero(&pstore->entry, sizeof(pstore->entry));
+			pstore->kif = NULL;
+			pstore->rule.ptr = NULL;
+			if (n->rule.ptr != NULL)
+				pstore->rule.nr = n->rule.ptr->nr;
 			pstore->creation = secs - pstore->creation;