diff options
author | ae <ae@FreeBSD.org> | 2015-03-12 08:57:24 +0000 |
---|---|---|
committer | ae <ae@FreeBSD.org> | 2015-03-12 08:57:24 +0000 |
commit | cc29b99b5c7678b30f105f23bd5e92ea81115b9e (patch) | |
tree | 011a2cc4f0213076c2065c074db570889a6ce326 /sys/netpfil/pf/pf.c | |
parent | 8f1c95f6062515ca05c42c43f8ff140b614ef155 (diff) | |
download | FreeBSD-src-cc29b99b5c7678b30f105f23bd5e92ea81115b9e.zip FreeBSD-src-cc29b99b5c7678b30f105f23bd5e92ea81115b9e.tar.gz |
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.
Submitted by: Kristof Provost
MFC after: 1 week
Diffstat (limited to 'sys/netpfil/pf/pf.c')
-rw-r--r-- | sys/netpfil/pf/pf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index b32288b..7c3ddb8 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5470,6 +5470,7 @@ pf_route6(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, PF_STATE_UNLOCK(s); m0->m_flags |= M_SKIP_FIREWALL; ip6_output(m0, NULL, NULL, 0, NULL, NULL, NULL); + *m = NULL; return; } |