Page MenuHomeFreeBSD

pf: ensure states passed to pf_free_state() are always unlinked
ClosedPublic

Authored by kp on Aug 31 2021, 3:04 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 10:56 PM
Unknown Object (File)
Thu, Nov 14, 1:46 AM
Unknown Object (File)
Oct 12 2024, 8:41 PM
Unknown Object (File)
Sep 25 2024, 2:19 PM
Unknown Object (File)
Sep 25 2024, 12:21 PM
Unknown Object (File)
Sep 24 2024, 8:31 AM
Unknown Object (File)
Sep 23 2024, 11:02 AM
Unknown Object (File)
Sep 20 2024, 7:12 AM

Details

Summary

In pf_create_state() we can end up deleting the state immediately. This
can happen if we fail to map the relevant addresses or fail
normalization or fail to insert it into the state table.
If that happens we delete the state again with pf_free_state(). However,
this asserts that the state must be unlinked.

It's correct to simply set the state to PFTM_UNLINKED because we've not
yet linked it.

Submitted by: Mateusz Guzik <mjg@FreeBSD.org>
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41292
Build 38181: arc lint + arc unit