[Bug 200330] panic: pf_addr_cmp: unknown address family 0 when scrub fragment drop-ovl is used

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Thu Jun 18 21:24:35 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=200330

--- Comment #19 from commit-hook at freebsd.org ---
A commit references this bug:

Author: kp
Date: Thu Jun 18 21:23:42 UTC 2015
New revision: 284580
URL: https://svnweb.freebsd.org/changeset/base/284580

Log:
  Merge r284222, r284260

  pf: address family must be set when creating a pf_fragment

  Fix a panic when handling fragmented ip4 packets with 'drop-ovl' set.
  In that scenario we take a different branch in pf_normalize_ip(), taking us
to
  pf_fragcache() (rather than pf_reassemble()). In pf_fragcache() we create a
  pf_fragment, but do not set the address family. This leads to a panic when we
  try to insert that into pf_frag_tree because pf_addr_cmp(), which is used to
  compare the pf_fragments doesn't know what to do if the address family is not
  set.

  Simply ensure that the address family is set correctly (always AF_INET in
this
  path).

  When we try to look up a pf_fragment with pf_find_fragment() we compare (see
  pf_frag_compare()) addresses (and family), but also protocol.  We failed to
  save the protocol to the pf_fragment in pf_fragcache(), resulting in failing
  reassembly.

  PR:        200330
  Differential Revision:    https://reviews.freebsd.org/D2824
  Reviewed by:    gnn

Changes:
_U  stable/10/
  stable/10/sys/netpfil/pf/pf_norm.c

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-pf mailing list