public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Cc: stable@vger.kernel.org, Sasha Levin <sashal@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH 6.6.y] ipv6: fix source address selection with route leak
Date: Mon, 12 Aug 2024 16:22:25 +0200	[thread overview]
Message-ID: <2024081215-maturing-unsliced-a989@gregkh> (raw)
In-Reply-To: <20240805125340.1039685-1-nicolas.dichtel@6wind.com>

On Mon, Aug 05, 2024 at 02:53:40PM +0200, Nicolas Dichtel wrote:
> Commit 252442f2ae317d109ef0b4b39ce0608c09563042 upstream.
> 
> By default, an address assigned to the output interface is selected when
> the source address is not specified. This is problematic when a route,
> configured in a vrf, uses an interface from another vrf (aka route leak).
> The original vrf does not own the selected source address.
> 
> Let's add a check against the output interface and call the appropriate
> function to select the source address.
> 
> There was a conflict during the backport in the function
> ip6_dst_lookup_tail(). The upstream commit fa17a6d8a5bd ("ipv6: lockless
> IPV6_ADDR_PREFERENCES implementation") added a READ_ONCE() on
> inet6_sk(sk)->srcprefs.
> 
> CC: stable@vger.kernel.org
> Fixes: 0d240e7811c4 ("net: vrf: Implement get_saddr for IPv6")
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> Link: https://patch.msgid.link/20240710081521.3809742-3-nicolas.dichtel@6wind.com
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
> ---
>  include/net/ip6_route.h | 22 +++++++++++++++-------
>  net/ipv6/ip6_output.c   |  1 +
>  net/ipv6/route.c        |  2 +-
>  3 files changed, 17 insertions(+), 8 deletions(-)

Now queued up, thanks.

greg k-h

      reply	other threads:[~2024-08-12 14:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-29  7:50 FAILED: patch "[PATCH] ipv6: fix source address selection with route leak" failed to apply to 6.6-stable tree gregkh
2024-08-05 12:53 ` [PATCH 6.6.y] ipv6: fix source address selection with route leak Nicolas Dichtel
2024-08-12 14:22   ` Greg KH [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=2024081215-maturing-unsliced-a989@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=kuba@kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=sashal@kernel.org \
    --cc=stable@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