Page MenuHomeFreeBSD

pf: Set the reassembly flags under the rules lock
AcceptedPublic

Authored by rcm on Fri, Oct 9, 3:19 PM.
Tags
None
Referenced Files
F175717010: D60531.id.diff
Mon, Oct 12, 6:12 PM
Unknown Object (File)
Mon, Oct 12, 6:36 AM
Unknown Object (File)
Mon, Oct 12, 12:33 AM
Unknown Object (File)
Sun, Oct 11, 4:23 PM
Unknown Object (File)
Sun, Oct 11, 3:33 AM
Unknown Object (File)
Sun, Oct 11, 3:18 AM
Unknown Object (File)
Sun, Oct 11, 2:48 AM
Unknown Object (File)
Sat, Oct 10, 11:55 PM

Details

Reviewers
kp
Summary

DIOCSETREASS stored V_pf_status.reass twice with no lock, first the
flags it was given and then, if reassembly was not among them, zero.
pf_normalize_ip() and pf_normalize_ip6() read the flags with the rules
lock held for reading, so a packet could see the intermediate value.
Compute the flags first and store them once, with the rules lock held
for writing, as DIOCSETDEBUG and DIOCSETHOSTID do.

Fixes: 39282ef356db ("pf: backport OpenBSD syntax of "scrub" option for "match" and "pass" rules")
MFC after: 2 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped