HomeFreeBSD

ipsec: Return error code if no matching SA was found

Description

ipsec: Return error code if no matching SA was found

If we matched SP to a packet, but no associated SA was found
ipsec4_allocsa will return NULL while setting error=0.
This resulted in use after free and potential kernel panic.
Return EINPROGRESS if the case described above instead.

Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D30994

Details

Provenance
kdAuthored on Aug 13 2021, 7:35 AM
wmaCommitted on Aug 13 2021, 7:35 AM
Differential Revision
D30994: Return error code if no matching SA was found
Parents
rG6b66194bcb7e: ipsec: Check PMTU before sending a frame.
Branches
Unknown
Tags
Unknown