pf_state_key_link_reverse() is prone to race on parallel forwarding
authorsashan <sashan@openbsd.org>
Tue, 27 Apr 2021 09:38:29 +0000 (09:38 +0000)
committersashan <sashan@openbsd.org>
Tue, 27 Apr 2021 09:38:29 +0000 (09:38 +0000)
commit43e954e31fd47e7049d74a1d85cf400328ac0d98
tree856979a0b4695abbc15f3145b14f7565298fadc4
parent70e022cd075a45ccc9a3e1d199ce0bf576daee91
pf_state_key_link_reverse() is prone to race on parallel forwarding

we need to adjust assertions. at time we call pf_state_key_link_reverse()
is state_key either linked to correct reverse peer or not linked at all.
The pf_state_key_link_reverse() is being called as a reader ons tate_lock.
There might be more packets, which try to update the state key.

OK bluhm@
sys/net/pf.c