[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20150406.161425.780590849435253068.davem@davemloft.net>
Date: Mon, 06 Apr 2015 16:14:25 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: hannes@...essinduktion.org
Cc: netdev@...r.kernel.org, jiri@...nulli.us
Subject: Re: [PATCH net-next] ipv6: protect skb->sk accesses from recursive
dereference inside the stack
From: Hannes Frederic Sowa <hannes@...essinduktion.org>
Date: Wed, 1 Apr 2015 17:07:44 +0200
> From: "hannes@...essinduktion.org" <hannes@...essinduktion.org>
>
> We should not consult skb->sk for output decisions in xmit recursion
> levels > 0 in the stack. Otherwise local socket settings could influence
> the result of e.g. tunnel encapsulation process.
>
> ipv6 does not conform with this in three places:
>
> 1) ip6_fragment: we do consult ipv6_npinfo for frag_size
>
> 2) sk_mc_loop in ipv6 uses skb->sk and checks if we should
> loop the packet back to the local socket
>
> 3) ip6_skb_dst_mtu could query the settings from the user socket and
> force a wrong MTU
>
> Furthermore:
> In sk_mc_loop we could potentially land in WARN_ON(1) if we use a
> PF_PACKET socket ontop of an IPv6-backed vxlan device.
>
> Reuse xmit_recursion as we are currently only interested in protecting
> tunnel devices.
>
> Cc: Jiri Pirko <jiri@...nulli.us>
> Signed-off-by: Hannes Frederic Sowa <hannes@...essinduktion.org>
So I'm applying this now for 'net' and queueing it up for -stable.
In net-next, we're going to pass the tunnel socket pointer down as per
the work I've been doing over the weekend.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists