Page MenuHomeFreeBSD

Use zfree() to explicitly zero IPsec keys.
ClosedPublic

Authored by jhb on Jun 25 2020, 12:42 AM.
Tags
None
Referenced Files
F160556794: D25442.id73614.diff
Thu, Jun 25, 3:51 PM
F160491588: D25442.diff
Thu, Jun 25, 1:55 AM
Unknown Object (File)
Mon, Jun 15, 5:01 PM
Unknown Object (File)
Mon, Jun 15, 4:59 PM
Unknown Object (File)
May 7 2026, 1:25 AM
Unknown Object (File)
May 6 2026, 11:01 AM
Unknown Object (File)
May 3 2026, 7:11 AM
Unknown Object (File)
Apr 28 2026, 10:06 PM
Subscribers

Details

Test Plan
  • tested with IPsec tunnels over IPv4 (AES-CBC + SHA1 and AES-GCM) and IPv6 (AES-GCM) and using setkey -F to clear state after

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 31945
Build 29496: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Jun 25 2020, 12:42 AM

No interest in ipsec.

I think setting tdb_xform to NULL is no longer needed (as they are about to be done by the caller anyway).

sys/netipsec/xform_ah.c
256

Looks like this is redundant too? (Already done by caller, key_cleansav).

sys/netipsec/xform_esp.c
250

Looks like this is redundant too? (Already done by caller, key_cleansav).

sys/netipsec/xform_tcp.c
368

Looks like this is redundant too? (Already done by caller, key_cleansav).

This revision is now accepted and ready to land.Jun 25 2020, 4:36 AM

I think setting tdb_xform to NULL is no longer needed (as they are about to be done by the caller anyway).

Yes, I removed those in the followup change. Here I was trying to just focus on the key zeroing via zfree separate from the other change.

This revision was automatically updated to reflect the committed changes.