lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131018154123.GM2596@neomailbox.net>
Date:	Fri, 18 Oct 2013 17:41:23 +0200
From:	Antonio Quartulli <antonio@...hcoding.com>
To:	Vlad Yasevich <vyasevic@...hat.com>
Cc:	Pablo Neira Ayuso <pablo@...filter.org>,
	Antonio Quartulli <antonio@...n-mesh.com>,
	"David S. Miller" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH net] bridge: clean the nf_bridge status when forwarding
 the skb

On Fri, Oct 18, 2013 at 11:33:06AM -0400, Vlad Yasevich wrote:
> On 10/18/2013 10:46 AM, Antonio Quartulli wrote:
> > On Fri, Oct 18, 2013 at 10:32:09AM -0400, Vlad Yasevich wrote:
> >> On 10/18/2013 07:35 AM, Antonio Quartulli wrote:
> >>> On Fri, Oct 18, 2013 at 01:10:41PM +0200, Pablo Neira Ayuso wrote:
> >>>> On Thu, Oct 17, 2013 at 01:37:35PM +0200, Antonio Quartulli wrote:
> >>>>> On Thu, Oct 17, 2013 at 04:28:57AM -0700, Pablo Neira Ayuso wrote:
> >
> > [...]
> >
> >>>
> >>> The problem I was having was due to an skb entering br0 first and br1 later.
> >>> When reaching br1 skb->nf_bridge was != NULL because of the previous processing
> >>> in br0.
> >>>
> >>
> >> Doesn't br_nf_pre_routing already take care of this for you?  It will
> >> drop the ref on the current nf_bridge and allocate a new one.  Is that
> >> not sufficient?
> >
> > In my case that line is not reached because
> >
> >   700         if (!IS_IP(skb) && !IS_VLAN_IP(skb) && !IS_PPPOE_IP(skb))
> >
> > is always true: the packet getting analysed is a batman-adv encapsulated packet,
> > which does not match any of the three above.
> >
> > Cheers,
> >
> 
> Looking at other encapsulators (PPP, iptunnel, VXLAN), they do
> nf_reset() on input.  Would that be appropriate for batman as well?

I thought that too.

But at this point, wouldn't it be better to do a reset here and remove the other
resets from any other encapsulation module?

Maybe this operation is supposed to not happen if no encapsulation is involved?
I thought that polishing the nf state when exiting the nf related path was a
clean and easy solution.

Moreover we avoid that any newly implemented tunneling module hit this problem again.


Cheers,

-- 
Antonio Quartulli

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ