Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jun 2015 16:53:33 +0200
From:      Oliver Pinter <oliver.pinter@hardenedbsd.org>
To:        Kristof Provost <kp@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r284222 - head/sys/netpfil/pf
Message-ID:  <CAPQ4ffur1oOip1Zbz7-kJC=cUCgLvvku3iOB-gNp66frGT2NfA@mail.gmail.com>
In-Reply-To: <201506101344.t5ADi4fk023661@svn.freebsd.org>
References:  <201506101344.t5ADi4fk023661@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 6/10/15, Kristof Provost <kp@freebsd.org> wrote:
> Author: kp
> Date: Wed Jun 10 13:44:04 2015
> New Revision: 284222
> URL: https://svnweb.freebsd.org/changeset/base/284222
>
> Log:
>   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).
>
>   PR:			200330
>   Differential Revision:	https://reviews.freebsd.org/D2769
>   Approved by:		philip (mentor), gnn (mentor)
>
> Modified:
>   head/sys/netpfil/pf/pf_norm.c

This commit required to 10-STABLE too or this bug exists only in
11-CURRENT? If the former, you have any plan to MFC the patch?

>
> Modified: head/sys/netpfil/pf/pf_norm.c
> ==============================================================================
> --- head/sys/netpfil/pf/pf_norm.c	Wed Jun 10 13:17:41 2015	(r284221)
> +++ head/sys/netpfil/pf/pf_norm.c	Wed Jun 10 13:44:04 2015	(r284222)
> @@ -823,6 +823,7 @@ pf_fragcache(struct mbuf **m0, struct ip
>  		(*frag)->fr_max = 0;
>  		(*frag)->fr_src.v4 = h->ip_src;
>  		(*frag)->fr_dst.v4 = h->ip_dst;
> +		(*frag)->fr_af = AF_INET;
>  		(*frag)->fr_id = h->ip_id;
>  		(*frag)->fr_timeout = time_uptime;
>
> _______________________________________________
> svn-src-head@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPQ4ffur1oOip1Zbz7-kJC=cUCgLvvku3iOB-gNp66frGT2NfA>