]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r285999 (kp):
authorgjb <gjb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 30 Jul 2015 16:06:13 +0000 (16:06 +0000)
committergjb <gjb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Thu, 30 Jul 2015 16:06:13 +0000 (16:06 +0000)
commit84bf45602c9371606f8dab1799712a4d91a61546
tree9d71d848c00154c3ae0acbd3f59895134a986f6f
parent3177349704cc617d0858a59778c1c924e012b029
MFC r285999 (kp):
  pf: Always initialise pf_fragment.fr_flags

  When we allocate the struct pf_fragment in pf_fillup_fragment() we
  forgot to initialise the fr_flags field. As a result we sometimes
  mistakenly thought the fragment to not be a buffered fragment.
  This resulted in panics because we'd end up freeing the pf_fragment
  but not removing it from V_pf_fragqueue (believing it to be part of
  V_pf_cachequeue).  The next time we iterated V_pf_fragqueue we'd use
  a freed object and panic.

  While here also fix a pf_fragment use after free in pf_normalize_ip().
  pf_reassemble() frees the pf_fragment, so we can't use it any more.

X-MFS-To: releng/10.2
Sponsored by: The FreeBSD Foundation

git-svn-id: svn://svn.freebsd.org/base/stable/10@286079 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netpfil/pf/pf_norm.c