diff options
author | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2022-06-07 22:14:16 +0000 |
---|---|---|
committer | Alexandr Nedvedicky <sashan@cvs.openbsd.org> | 2022-06-07 22:14:16 +0000 |
commit | fcabdcf6cfbe092a691105b794e63118ba410562 (patch) | |
tree | 6ad1600b602b7d566d3ab765c5a9e9c6839e46d5 /sys | |
parent | cb6bee2b079dcfd9ef1dd7da7a4503e5fa0077f3 (diff) |
fixes NULL pointer dereference panic triggered by relayd.
same panic can be triggered when address table is part
of anchor loaded by 'load anchor ... from ..,' statement.
pf_find_or_create_ruleset() function called by pfr_add_tables()
must receive ruleset name which comes from pre-allocated root
table.
OK claudio@ dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/pf_table.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pf_table.c b/sys/net/pf_table.c index 8315ea5dd3a..f261baef963 100644 --- a/sys/net/pf_table.c +++ b/sys/net/pf_table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_table.c,v 1.140 2022/05/10 23:12:25 sashan Exp $ */ +/* $OpenBSD: pf_table.c,v 1.141 2022/06/07 22:14:15 sashan Exp $ */ /* * Copyright (c) 2002 Cedric Berger @@ -1628,8 +1628,7 @@ pfr_add_tables(struct pfr_table *tbl, int size, int *nadd, int flags) if (r != NULL) continue; - q->pfrkt_rs = pf_find_or_create_ruleset( - q->pfrkt_root->pfrkt_anchor); + q->pfrkt_rs = pf_find_or_create_ruleset(q->pfrkt_anchor); /* * root tables are attached to main ruleset, * because ->pfrkt_anchor[0] == '\0' |