Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Apr 2017 12:22:34 +0000 (UTC)
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r316355 - head/sys/netpfil/pf
Message-ID:  <201704011222.v31CMYhP035535@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kp
Date: Sat Apr  1 12:22:34 2017
New Revision: 316355
URL: https://svnweb.freebsd.org/changeset/base/316355

Log:
  pf: Fix leak of pf_state_keys
  
  If we hit the state limit we returned from pf_create_state() without cleaning
  up.
  
  PR:		217997
  Submitted by:	Max <maximos@als.nnov.ru>
  MFC after:	1 week

Modified:
  head/sys/netpfil/pf/pf.c

Modified: head/sys/netpfil/pf/pf.c
==============================================================================
--- head/sys/netpfil/pf/pf.c	Sat Apr  1 11:24:34 2017	(r316354)
+++ head/sys/netpfil/pf/pf.c	Sat Apr  1 12:22:34 2017	(r316355)
@@ -3559,7 +3559,7 @@ pf_create_state(struct pf_rule *r, struc
 	    (counter_u64_fetch(r->states_cur) >= r->max_states)) {
 		counter_u64_add(V_pf_status.lcounters[LCNT_STATES], 1);
 		REASON_SET(&reason, PFRES_MAXSTATES);
-		return (PF_DROP);
+		goto csfailed;
 	}
 	/* src node for filter rule */
 	if ((r->rule_flag & PFRULE_SRCTRACK ||



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704011222.v31CMYhP035535>