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
F108547006: D31752.id94608.diff
Sun, Jan 26, 4:50 AM
Unknown Object (File)
Fri, Jan 24, 5:18 PM
Unknown Object (File)
Fri, Jan 17, 3:37 PM
Unknown Object (File)
Dec 25 2024, 11:09 PM
Unknown Object (File)
Dec 9 2024, 4:01 PM
Unknown Object (File)
Nov 25 2024, 12:23 AM
Unknown Object (File)
Nov 16 2024, 10:56 PM
Unknown Object (File)
Nov 14 2024, 1:46 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