Page MenuHomeFreeBSD

sys/netipsec: ensure sah stability during input callback processing
ClosedPublic

Authored by kib on Dec 20 2025, 12:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 12, 10:35 AM
Unknown Object (File)
Sun, Jan 11, 6:43 AM
Unknown Object (File)
Sat, Jan 10, 3:13 PM
Unknown Object (File)
Sat, Jan 10, 4:36 AM
Unknown Object (File)
Wed, Jan 7, 1:39 AM
Unknown Object (File)
Jan 6 2026, 4:14 AM
Unknown Object (File)
Jan 5 2026, 4:05 PM
Unknown Object (File)
Jan 4 2026, 11:43 PM

Details

Summary
Reported by:    ae
Tested by:      ae, Daniel Dubnikov <ddaniel@nvidia.com>
Reviewed by:    Ariel Ehrenberg <aehrenberg@nvidia.com>
Sponsored by:   NVidia networking

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kib requested review of this revision.EditedDec 20 2025, 12:06 PM

I have to keep sah tree rlocked much deeper, right until the if_input is called finally, but drop it right before going up to stack. Otherwise, we might recurse on the sah tree lock, since input sometimes needs to send packet, which also enters the ipsec for output. Also, the same problem exists for all ESP/AH/IPCOMP processing callbacks.

This revision is now accepted and ready to land.Dec 22 2025, 12:22 PM

I think you should note that this fixes some rare panics, that are reported in derived projects: panic: esp_input_cb: Unexpected address family