netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: jgunthorpe@obsidianresearch.com
Cc: nhorman@tuxdriver.com, dborkman@redhat.com,
	linux-sctp@vger.kernel.org, vyasevich@gmail.com,
	netdev@vger.kernel.org
Subject: Re: [PATCH] sctp: Fix mangled IPv4 addresses on a IPv6 listening socket
Date: Wed, 27 May 2015 14:17:28 -0400 (EDT)	[thread overview]
Message-ID: <20150527.141728.1015701398260699520.davem@davemloft.net> (raw)
In-Reply-To: <20150526233017.GB22391@obsidianresearch.com>

From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date: Tue, 26 May 2015 17:30:17 -0600

> sctp_v4_map_v6 was subtly writing and reading from members
> of a union in a way the clobbered data it needed to read before
> it read it.
> 
> Zeroing the v6 flowinfo overwrites the v4 sin_addr with 0, meaning
> that every place that calls sctp_v4_map_v6 gets ::ffff:0.0.0.0 as the
> result.
> 
> Reorder things to guarantee correct behaviour no matter what the
> union layout is.
> 
> This impacts user space clients that open an IPv6 SCTP socket and
> receive IPv4 connections. Prior to 299ee user space would see a
> sockaddr with AF_INET and a correct address, after 299ee the sockaddr
> is AF_INET6, but the address is wrong.
> 
> Fixes: 299ee123e198 (sctp: Fixup v4mapped behaviour to comply with Sock API)
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>

Applied and queued up for -stable, thakns.

      parent reply	other threads:[~2015-05-27 18:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-26 23:30 [PATCH] sctp: Fix mangled IPv4 addresses on a IPv6 listening socket Jason Gunthorpe
2015-05-27  8:11 ` Daniel Borkmann
2015-05-27  9:06 ` David Laight
2015-05-27  9:34   ` Daniel Borkmann
2015-05-27 10:11     ` David Laight
2015-05-27 15:32       ` Jason Gunthorpe
2015-05-27 16:16         ` David Laight
2015-05-27 16:31           ` Jason Gunthorpe
2015-05-27 16:41             ` David Laight
2015-05-27 17:04               ` Jason Gunthorpe
2015-05-28  8:58                 ` David Laight
2015-05-27 14:06 ` Neil Horman
2015-05-27 18:17 ` 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=20150527.141728.1015701398260699520.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dborkman@redhat.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    /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).