Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1196571 > unrolled thread

Re: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive()

Started byPravin Shelar <pshelar@nicira.com>
First post2015-07-31 05:50 +0200
Last post2015-07-31 05:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive() Pravin Shelar <pshelar@nicira.com> - 2015-07-31 05:50 +0200

#1196571 — Re: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive()

FromPravin Shelar <pshelar@nicira.com>
Date2015-07-31 05:50 +0200
SubjectRe: [PATCH net-next 1/9] openvswitch: Scrub packet in ovs_vport_receive()
Message-ID<pS9uy-25G-15@gated-at.bofh.it>
On Thu, Jul 30, 2015 at 11:12 AM, Joe Stringer <joestringer@nicira.com> wrote:
> Signed-off-by: Joe Stringer <joestringer@nicira.com>
> ---
>  net/openvswitch/vport.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
> index d14f594..baa018f 100644
> --- a/net/openvswitch/vport.c
> +++ b/net/openvswitch/vport.c
> @@ -475,6 +475,9 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
>         struct sw_flow_key key;
>         int error;
>
> +       if (!skb->sk || (sock_net(skb->sk) != read_pnet(&vport->dp->net)))
> +               skb_scrub_packet(skb, true);
> +
skb scrub drops dst which cause use-after-free bug for flow based
tunnel devices.


>         stats = this_cpu_ptr(vport->percpu_stats);
>         u64_stats_update_begin(&stats->syncp);
>         stats->rx_packets++;
> --
> 2.1.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web