summaryrefslogtreecommitdiffstats
path: root/sys/netpfil/pf
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2017-08-10 06:59:07 +0000
committerdelphij <delphij@FreeBSD.org>2017-08-10 06:59:07 +0000
commit91baad1bb58bfa59793d9421521a9faf7df0edca (patch)
tree42938bf2e6e785a0b129322177b5ff0a1ddeeba9 /sys/netpfil/pf
parent2f4b735c66deb54490042a818e8fd26fa46818f1 (diff)
downloadFreeBSD-src-91baad1bb58bfa59793d9421521a9faf7df0edca.zip
FreeBSD-src-91baad1bb58bfa59793d9421521a9faf7df0edca.tar.gz
Fix OpenSSH Denial of Service vulnerability. [SA-17:06]releng/11.1
Fix VNET kernel panic with asynchronous I/O. [EN-17:07] Fix pf(4) housekeeping thread causes kernel panic. [EN-17:08] Approved by: so
Diffstat (limited to 'sys/netpfil/pf')
-rw-r--r--sys/netpfil/pf/pf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index 8dc89a8..1fa0b7a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -129,6 +129,8 @@ VNET_DEFINE(int, pf_tcp_secret_init);
#define V_pf_tcp_secret_init VNET(pf_tcp_secret_init)
VNET_DEFINE(int, pf_tcp_iss_off);
#define V_pf_tcp_iss_off VNET(pf_tcp_iss_off)
+VNET_DECLARE(int, pf_vnet_active);
+#define V_pf_vnet_active VNET(pf_vnet_active)
/*
* Queue for pf_intr() sends.
@@ -1441,6 +1443,12 @@ pf_purge_thread(void *unused __unused)
kproc_exit(0);
}
+ /* Wait while V_pf_default_rule.timeout is initialized. */
+ if (V_pf_vnet_active == 0) {
+ CURVNET_RESTORE();
+ continue;
+ }
+
/* Process 1/interval fraction of the state table every run. */
idx = pf_purge_expired_states(idx, pf_hashmask /
(V_pf_default_rule.timeout[PFTM_INTERVAL] * 10));
OpenPOWER on IntegriCloud