Page MenuHomeFreeBSD

ipsec esp: avoid dereferencing freed secasindex
ClosedPublic

Authored by kib on Feb 25 2024, 10:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 21 2025, 1:44 PM
Unknown Object (File)
Feb 9 2025, 3:17 PM
Unknown Object (File)
Feb 3 2025, 9:15 PM
Unknown Object (File)
Jan 26 2025, 5:36 AM
Unknown Object (File)
Jan 9 2025, 9:18 PM
Unknown Object (File)
Jan 9 2025, 6:47 AM
Unknown Object (File)
Dec 9 2024, 3:49 AM
Unknown Object (File)
Nov 28 2024, 6:52 AM

Details

Summary
It is possible that SA was removed while processing packed, in which
case it changed to the DEAD state and it index removed from the tree.
Dereferencing sav->sah then touches freed memory.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Feb 25 2024, 10:37 AM

Probably we should increase esps_notdb or esps_invalid counter here.

This revision is now accepted and ready to land.Feb 26 2024, 7:40 AM

Update counter, add debug printf for the situation.

This revision now requires review to proceed.Feb 26 2024, 10:04 AM
This revision is now accepted and ready to land.Feb 26 2024, 2:17 PM
This revision was automatically updated to reflect the committed changes.