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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 5 Oct 2016 17:18:08 +0300
From:   Eyal Birger <eyal.birger@...il.com>
To:     Jiri Benc <jbenc@...hat.com>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        pravin shelar <pshelar@....org>, Eric Garver <e@...g.me>
Subject: Re: [PATCH net-next v2 1/3] openvswitch: normalize vlan rx path

Hi,

On Wed, Oct 5, 2016 at 4:07 PM, Jiri Benc <jbenc@...hat.com> wrote:
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index 4d67ea856067..c47b3da8ecf2 100644
> --- a/net/openvswitch/datapath.c
> +++ b/net/openvswitch/datapath.c
> @@ -594,6 +594,16 @@ static int ovs_packet_cmd_execute(struct sk_buff *skb, struct genl_info *info)
>         else
>                 packet->protocol = htons(ETH_P_802_2);
>
> +       if (eth_type_vlan(packet->protocol)) {
> +               __skb_pull(packet, ETH_HLEN);
> +               skb_reset_network_header(packet);
> +               skb_reset_mac_len(packet);
> +               packet = skb_vlan_untag(packet);
> +               if (unlikely(!packet))
> +                       goto err;

I think at this point, 'eth' may point to a freed packet.
Maybe replace the 'eth' variable with a 'proto' variable caching the
value of eth_hdr(packet)->h_proto?

> +               skb_push(packet, ETH_HLEN);
> +       }
> +
>         /* Set packet's mru */
>         if (a[OVS_PACKET_ATTR_MRU]) {
>                 mru = nla_get_u16(a[OVS_PACKET_ATTR_MRU]);
> --
> 1.8.3.1
>

Eyal.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ