diff options
| author | R. Christian McDonald <rcm@FreeBSD.org> | 2026-11-16 15:16:55 +0000 |
|---|---|---|
| committer | R. Christian McDonald <rcm@FreeBSD.org> | 2026-11-16 15:17:58 +0000 |
| commit | 698d94219061eaca8dd5fd4d58bbece48ced3ac4 (patch) | |
| tree | c5318743ab97797447587c3629834d1813ee4225 /sys/dev/drm/radeon_microcode.h | |
| parent | 471d0cb24c6d1252f33dd1cdb6c907dd3b6b5ea4 (diff) | |
ipsec4_perform_request() maps unmapped (M_EXTPG) mbufs before the
software transforms run. mb_unmapped_to_ext() frees the chain when it
fails, and the error return then kept both the SA reference taken by
ipsec4_allocsa() and the SP reference that this function must release.
The SA, its crypto session and the SP were never freed after they were
deleted.
The conversion fails with ENOMEM when an mbuf allocation fails, for
example for sendfile(2) data sent through a software IPv4 SA, and with
EINVAL for every packet of a NIC kTLS connection that matches an IPsec
policy. Take the common error path instead; it skips m_freem() when
the mbuf pointer is NULL.
IPv6 is not affected: ipsec6_perform_request() does not call
mb_unmapped_to_ext().
Reported by: llm-postcr
Fixes: 0ff2d00d2aa3 ("ipsec: allow it to work with unmapped mbufs")
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Diffstat (limited to 'sys/dev/drm/radeon_microcode.h')
0 files changed, 0 insertions, 0 deletions
