netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: cpaasch@apple.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net] tcp md5sig: Use skb's saddr when replying to an incoming segment
Date: Tue, 12 Dec 2017 11:21:19 -0500 (EST)	[thread overview]
Message-ID: <20171212.112119.160806066229814761.davem@davemloft.net> (raw)
In-Reply-To: <20171211080546.89418-1-cpaasch@apple.com>

From: Christoph Paasch <cpaasch@apple.com>
Date: Mon, 11 Dec 2017 00:05:46 -0800

> The MD5-key that belongs to a connection is identified by the peer's
> IP-address. When we are in tcp_v4(6)_reqsk_send_ack(), we are replying
> to an incoming segment from tcp_check_req() that failed the seq-number
> checks.
> 
> Thus, to find the correct key, we need to use the skb's saddr and not
> the daddr.
> 
> This bug seems to have been there since quite a while, but probably got
> unnoticed because the consequences are not catastrophic. We will call
> tcp_v4_reqsk_send_ack only to send a challenge-ACK back to the peer,
> thus the connection doesn't really fail.
> 
> Fixes: 9501f9722922 ("tcp md5sig: Let the caller pass appropriate key for tcp_v{4,6}_do_calc_md5_hash().")
> Signed-off-by: Christoph Paasch <cpaasch@apple.com>

Applied and queued up for -stable, thanks.

      parent reply	other threads:[~2017-12-12 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11  8:05 [PATCH net] tcp md5sig: Use skb's saddr when replying to an incoming segment Christoph Paasch
2017-12-12  4:51 ` Eric Dumazet
2017-12-12 16:21 ` 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=20171212.112119.160806066229814761.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=cpaasch@apple.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).