aboutsummaryrefslogtreecommitdiff
path: root/contrib/processor-trace/libipt/internal/include/pt_sync.h
diff options
context:
space:
mode:
authorR. Christian McDonald <rcm@FreeBSD.org>2026-11-09 15:30:12 +0000
committerR. Christian McDonald <rcm@FreeBSD.org>2026-11-09 15:30:12 +0000
commit488bf44737722c27f2e93b5347648e76e86540df (patch)
tree14bfd32700010e6acc427cb339497bf96358bdad /contrib/processor-trace/libipt/internal/include/pt_sync.h
parentbd9d7cdd142073d2a83d2748df8781ee552f2336 (diff)
netipsec: Do not leak the SAH when an SA is clonedHEADmain
key_updateaddresses() gives the clone of an SA a new SAH reference when the SA index comes from key_newsah() or key_getsah(), but nothing releases the reference of the old SA: key_delsav() leaves the SAH alone, because key_unlinksav() normally releases it, and an SA that is replaced never goes through that. The SAH then stays allocated for good, after its SAs are flushed and after the vnet is destroyed, as an SADB_UPDATE with a new address does each time an IKE daemon moves an SA. The old SA cannot release the reference when it is replaced, since a sender that still holds it reads its SAH. Release it in key_delsav() instead. When only the NAT-T config changes, the clone used to take over the reference of the old SA; take a new one in that case as well, so that every SA holds its own. Reviewed by: kib, markj MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D61101
Diffstat (limited to 'contrib/processor-trace/libipt/internal/include/pt_sync.h')
0 files changed, 0 insertions, 0 deletions