Date: Thu, 19 Mar 2015 12:49:56 +0000 (UTC) From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r280251 - stable/10/sys/netpfil/pf Message-ID: <201503191249.t2JCnuEg030021@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ae Date: Thu Mar 19 12:49:55 2015 New Revision: 280251 URL: https://svnweb.freebsd.org/changeset/base/280251 Log: MFC r279910: Reset mbuf pointer to NULL in fastroute case to indicate that mbuf was consumed by filter. This fixes several panics due to accessing to mbuf after free. Modified: stable/10/sys/netpfil/pf/pf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf.c ============================================================================== --- stable/10/sys/netpfil/pf/pf.c Thu Mar 19 12:32:48 2015 (r280250) +++ stable/10/sys/netpfil/pf/pf.c Thu Mar 19 12:49:55 2015 (r280251) @@ -5440,6 +5440,7 @@ pf_route6(struct mbuf **m, struct pf_rul PF_STATE_UNLOCK(s); m0->m_flags |= M_SKIP_FIREWALL; ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL); + *m = NULL; return; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503191249.t2JCnuEg030021>