netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pull request (net): ipsec 2013-08-28
@ 2013-08-28 11:04 Steffen Klassert
  2013-08-28 11:04 ` [PATCH 1/8] xfrm: make local error reporting more robust Steffen Klassert
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Steffen Klassert @ 2013-08-28 11:04 UTC (permalink / raw)
  To: David Miller; +Cc: Herbert Xu, Steffen Klassert, netdev

This pull request fixes some issues that arise when 6in4 or 4in6 tunnels
are used in combination with IPsec, all from Hannes Frederic Sowa and a
null pointer dereference when queueing packets to the policy hold queue.

1) We might access the local error handler of the wrong address family if
   6in4 or 4in6 tunnel is protected by ipsec. Fix this by addind a pointer
   to the correct local_error to xfrm_state_afinet.

2) Add a helper function to always refer to the correct interpretation
   of skb->sk.

3) Call skb_reset_inner_headers to record the position of the inner headers
   when adding a new one in various ipv6 tunnels. This is needed to identify
   the addresses where to send back errors in the xfrm layer.

4) Dereference inner ipv6 header if encapsulated to always call the
   right error handler.

5) Choose protocol family by skb protocol to not call the wrong
   xfrm{4,6}_local_error handler in case an ipv6 sockets is used
   in ipv4 mode.

6) Partly revert "xfrm: introduce helper for safe determination of mtu"
   because this introduced pmtu discovery problems.

7) Set skb->protocol on tcp, raw and ip6_append_data genereated skbs.
   We need this to get the correct mtu informations in xfrm.

8) Fix null pointer dereference in xdst_queue_output.

Please pull or let me know if there are problems.

Thanks!

The following changes since commit d9bf5f130946695063469749bfd190087b7fad39:

  tun: compare with 0 instead of total_len (2013-08-13 19:29:08 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/klassert/ipsec.git master

for you to fetch changes up to 302a50bc941010d7a67f288fd0db31981e4d722d:

  xfrm: Fix potential null pointer dereference in xdst_queue_output (2013-08-28 08:47:14 +0200)

----------------------------------------------------------------
Hannes Frederic Sowa (7):
      xfrm: make local error reporting more robust
      xfrm: introduce helper for safe determination of mtu
      ipv6: wire up skb->encapsulation
      ipv6: xfrm: dereference inner ipv6 header if encapsulated
      xfrm: choose protocol family by skb protocol
      xfrm: revert ipv4 mtu determination to dst_mtu
      ipv6: set skb->protocol on tcp, raw and ip6_append_data genereated skbs

Steffen Klassert (1):
      xfrm: Fix potential null pointer dereference in xdst_queue_output

 include/net/route.h     |    8 ++++++++
 include/net/xfrm.h      |    6 ++++++
 net/ipv4/ip_output.c    |    8 --------
 net/ipv4/xfrm4_output.c |   16 +++++++++++-----
 net/ipv4/xfrm4_state.c  |    1 +
 net/ipv6/ip6_gre.c      |    5 +++++
 net/ipv6/ip6_output.c   |    3 +++
 net/ipv6/ip6_tunnel.c   |    6 ++++++
 net/ipv6/raw.c          |    1 +
 net/ipv6/sit.c          |    5 +++++
 net/ipv6/xfrm6_output.c |   21 +++++++++++++++------
 net/ipv6/xfrm6_state.c  |    1 +
 net/xfrm/xfrm_output.c  |   21 +++++++++++++++++++++
 net/xfrm/xfrm_policy.c  |    9 +--------
 net/xfrm/xfrm_state.c   |    7 ++-----
 15 files changed, 86 insertions(+), 32 deletions(-)

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

end of thread, other threads:[~2013-08-29 20:08 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-28 11:04 pull request (net): ipsec 2013-08-28 Steffen Klassert
2013-08-28 11:04 ` [PATCH 1/8] xfrm: make local error reporting more robust Steffen Klassert
2013-08-28 11:04 ` [PATCH 2/8] xfrm: introduce helper for safe determination of mtu Steffen Klassert
2013-08-28 11:04 ` [PATCH 3/8] ipv6: wire up skb->encapsulation Steffen Klassert
2013-08-28 11:04 ` [PATCH 4/8] ipv6: xfrm: dereference inner ipv6 header if encapsulated Steffen Klassert
2013-08-28 11:04 ` [PATCH 5/8] xfrm: choose protocol family by skb protocol Steffen Klassert
2013-08-28 11:04 ` [PATCH 6/8] xfrm: revert ipv4 mtu determination to dst_mtu Steffen Klassert
2013-08-28 11:04 ` [PATCH 7/8] ipv6: set skb->protocol on tcp, raw and ip6_append_data genereated skbs Steffen Klassert
2013-08-28 11:04 ` [PATCH 8/8] xfrm: Fix potential null pointer dereference in xdst_queue_output Steffen Klassert
2013-08-28 11:36   ` Eric Dumazet
2013-08-29  4:27     ` Steffen Klassert
2013-08-29 20:08 ` pull request (net): ipsec 2013-08-28 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).