Protect pf_reassemble() with pf fragment lock. When the pool limit
authorbluhm <bluhm@openbsd.org>
Mon, 22 Aug 2022 20:35:39 +0000 (20:35 +0000)
committerbluhm <bluhm@openbsd.org>
Mon, 22 Aug 2022 20:35:39 +0000 (20:35 +0000)
commit027f1a50a56346e90029267b06e5d9f61d0c699a
tree56451abfa58cefe8d606ccf7d9eea30b370fe7d9
parente00787e64c1954e9e57584fdf8a26c2dc4b405a7
Protect pf_reassemble() with pf fragment lock.  When the pool limit
for fragment entries was reached, pf_create_fragment() called
pf_flush_fragments() without lock.  This could result in a crash.
Let PF_FRAG_LOCK() cover the whole pf_reassemble() function as
pf_nfrents++ was also missing the lock.
crash found and fix tested by Hrvoje Popovski;  OK sashan@
sys/net/pf_norm.c