From: David Miller <davem@davemloft.net>
To: jbenc@redhat.com
Cc: netdev@vger.kernel.org, dev@openvswitch.org
Subject: Re: [PATCH net] openvswitch: fix panic with multiple vlan headers
Date: Fri, 22 Aug 2014 11:24:39 -0700 (PDT) [thread overview]
Message-ID: <20140822.112439.1786666004917748552.davem@davemloft.net> (raw)
In-Reply-To: <b490744c980813b54d54f628c719e03cdb143302.1408649593.git.jbenc@redhat.com>
From: Jiri Benc <jbenc@redhat.com>
Date: Thu, 21 Aug 2014 21:33:44 +0200
> When there are multiple vlan headers present in a received frame, the first
> one is put into vlan_tci and protocol is set to ETH_P_8021Q. Anything in the
> skb beyond the VLAN TPID may be still non-linear, including the inner TCI
> and ethertype. While ovs_flow_extract takes care of IP and IPv6 headers, it
> does nothing with ETH_P_8021Q. Later, if OVS_ACTION_ATTR_POP_VLAN is
> executed, __pop_vlan_tci pulls the next vlan header into vlan_tci.
>
> This leads to two things:
>
> 1. Part of the resulting ethernet header is in the non-linear part of the
> skb. When eth_type_trans is called later as the result of
> OVS_ACTION_ATTR_OUTPUT, kernel BUGs in __skb_pull. Also, __pop_vlan_tci
> is in fact accessing random data when it reads past the TPID.
>
> 2. network_header points into the ethernet header instead of behind it.
> mac_len is set to a wrong value (10), too.
>
> Reported-by: Yulong Pei <ypei@redhat.com>
> Signed-off-by: Jiri Benc <jbenc@redhat.com>
Applied and queued up for -stable, thanks Jiri.
prev parent reply other threads:[~2014-08-22 18:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-21 19:33 [PATCH net] openvswitch: fix panic with multiple vlan headers Jiri Benc
2014-08-22 18:24 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140822.112439.1786666004917748552.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=dev@openvswitch.org \
--cc=jbenc@redhat.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).