git: cdd4f32526f5 - stable/14 - if_ovpn: Fix a lock leak in an error path
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 14 Jul 2026 14:56:18 UTC
The branch stable/14 has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=cdd4f32526f5f2b7295164aafa53de2f2e7562ea
commit cdd4f32526f5f2b7295164aafa53de2f2e7562ea
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2026-06-20 14:12:19 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2026-07-14 14:08:40 +0000
if_ovpn: Fix a lock leak in an error path
Reviewed by: kp
MFC after: 1 week
Fixes: 04a7134c1e92 ("if_ovpn: fix use-after-free of mbuf")
Differential Revision: https://reviews.freebsd.org/D57696
(cherry picked from commit f7b71f832c990da0bf203095f02405df665529d0)
---
sys/net/if_ovpn.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c
index 3a04249ec554..041250cc2c08 100644
--- a/sys/net/if_ovpn.c
+++ b/sys/net/if_ovpn.c
@@ -2554,6 +2554,7 @@ ovpn_udp_input(struct mbuf *m, int off, struct inpcb *inp,
m = m_unshare(m, M_NOWAIT);
if (m == NULL) {
+ OVPN_RUNLOCK(sc);
OVPN_COUNTER_ADD(sc, nomem_data_pkts_in, 1);
if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1);
return (true);