git: df2e0c29b6b4 - stable/14 - pf: fix sctp normalisation cleanup
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 27 Nov 2026 12:23:32 UTC
The branch stable/14 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=df2e0c29b6b48b3bfbf0fd23587987741d05e707
commit df2e0c29b6b48b3bfbf0fd23587987741d05e707
Author: Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2026-11-19 13:14:36 +0000
Commit: Kristof Provost <kp@FreeBSD.org>
CommitDate: 2026-11-27 12:22:55 +0000
pf: fix sctp normalisation cleanup
If we fail to allocate the dst scrub structure we should free the src
one too, but we passed src rather than src->scrub.
Reported by: llm-postcr
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
(cherry picked from commit e53632189f09d7b5c6664fef51cbe4429e4b3243)
---
sys/netpfil/pf/pf_norm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index 414dc258cfa5..c4965f3c25e7 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -1595,7 +1595,7 @@ pf_normalize_sctp_init(struct mbuf *m, int off, struct pf_pdesc *pd,
dst->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT);
if (dst->scrub == NULL) {
- uma_zfree(V_pf_state_scrub_z, src);
+ uma_zfree(V_pf_state_scrub_z, src->scrub);
return (1);
}