diff options
| author | R. Christian McDonald <rcm@FreeBSD.org> | 2026-10-28 16:55:07 +0000 |
|---|---|---|
| committer | R. Christian McDonald <rcm@FreeBSD.org> | 2026-10-28 16:56:13 +0000 |
| commit | 389ae8e4fabeaf1c655f8116b1a1402e597fa515 (patch) | |
| tree | afe72347ae1d471cf1b0cda1395eaf1ace34db24 /sys/modules/dtb/mv/(developers-only) | |
| parent | 930be41aa75705673659ea92faaf24f75c629a33 (diff) | |
pf_state_key_attach() attaches the wire key first and then the stack
key, setting sks to NULL before the second pass. When the stack key
collides with an existing state, the error path removes the wire key
again but then frees sks, which is NULL by then: the stack key leaks.
pfsync hits this. A peer that gets a plain state in a bulk update
before a redirected state whose stack key is the plain state's key
fails to import the redirected state, leaks its stack key, and leaks
another one with every later update of that state.
Free sk, the key of the pass that collided (skw on the wire pass), and
add a test.
Reviewed by: kp
Fixes: 371bd29d4b22 ("pf: fix potential state key leak")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D60951
Diffstat (limited to 'sys/modules/dtb/mv/(developers-only)')
0 files changed, 0 insertions, 0 deletions
