netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 net-next 0/4] tunnels: fix incorrect IPv4/v6 headers interpretation
@ 2015-08-28 18:48 Jiri Benc
  2015-08-28 18:48 ` [PATCH v2 net-next 1/4] ip_tunnels: convert the mode field of ip_tunnel_info to flags Jiri Benc
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Jiri Benc @ 2015-08-28 18:48 UTC (permalink / raw)
  To: netdev; +Cc: Thomas Graf, Pravin Shelar

With tunneling, it is currently possible to get an IPv6 header and interpret
it as an IPv4 header, or to interpret an IPv6 address as an IPv4 address
(and vice versa). This leads to things like sending packets to incorrect
address, IPv6 flow label being interpreted as IP packet length, etc.

Fix several places where this can happen.

Most of this is net-next only. The third patch affects net, too, but it
doesn't seem there's anything in user space that sets the attribute at all
currently, thus net-next is fine.

Changelog:
v2: fixed geneve after incorrect rebase on top of Pravin's patches

Jiri Benc (4):
  ip_tunnels: convert the mode field of ip_tunnel_info to flags
  ip_tunnels: record IP version in tunnel info
  fou: reject IPv6 config
  vxlan: do not receive IPv4 packets on IPv6 socket

 drivers/net/geneve.c       |  4 +++-
 drivers/net/vxlan.c        |  5 ++++-
 include/net/dst_metadata.h |  2 +-
 include/net/ip_tunnels.h   | 19 ++++++++++++-------
 include/net/udp_tunnel.h   |  3 ++-
 net/core/filter.c          |  2 ++
 net/ipv4/fou.c             |  2 +-
 net/ipv4/ip_gre.c          |  3 ++-
 net/ipv4/ip_tunnel_core.c  |  2 +-
 net/ipv4/route.c           |  2 +-
 net/ipv6/ip6_udp_tunnel.c  |  9 +++++++++
 net/ipv6/route.c           |  2 +-
 net/openvswitch/flow.c     |  2 ++
 net/openvswitch/vport.c    |  2 ++
 14 files changed, 43 insertions(+), 16 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-08-30  9:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-28 18:48 [PATCH v2 net-next 0/4] tunnels: fix incorrect IPv4/v6 headers interpretation Jiri Benc
2015-08-28 18:48 ` [PATCH v2 net-next 1/4] ip_tunnels: convert the mode field of ip_tunnel_info to flags Jiri Benc
2015-08-28 22:15   ` Thomas Graf
2015-08-28 22:55   ` Pravin Shelar
2015-08-28 18:48 ` [PATCH v2 net-next 2/4] ip_tunnels: record IP version in tunnel info Jiri Benc
2015-08-28 22:24   ` Thomas Graf
2015-08-29  8:43     ` Jiri Benc
2015-08-28 22:55   ` Pravin Shelar
2015-08-28 18:48 ` [PATCH v2 net-next 3/4] fou: reject IPv6 config Jiri Benc
2015-08-28 18:48 ` [PATCH v2 net-next 4/4] vxlan: do not receive IPv4 packets on IPv6 socket Jiri Benc
2015-08-28 22:39   ` Thomas Graf
2015-08-29  8:55     ` Jiri Benc
2015-08-30  9:30       ` Thomas Graf
2015-08-29 20:08 ` [PATCH v2 net-next 0/4] tunnels: fix incorrect IPv4/v6 headers interpretation David Miller

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).