Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Rohit Maheshwari <rohitm@chelsio.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, borisp@mellanox.com,
	aviadye@mellanox.com, john.fastabend@gmail.com,
	daniel@iogearbox.net, manojmalviya@chelsio.com
Subject: Re: [PATCH net v4] net/tls: Fix to avoid gettig invalid tls record
Date: Wed, 19 Feb 2020 11:28:24 -0800	[thread overview]
Message-ID: <20200219112824.4c7e31fc@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <20200219041022.22701-1-rohitm@chelsio.com>

On Wed, 19 Feb 2020 09:40:22 +0530 Rohit Maheshwari wrote:
> Current code doesn't check if tcp sequence number is starting from (/after)
> 1st record's start sequnce number. It only checks if seq number is before
> 1st record's end sequnce number. This problem will always be a possibility
> in re-transmit case. If a record which belongs to a requested seq number is
> already deleted, tls_get_record will start looking into list and as per the
> check it will look if seq number is before the end seq of 1st record, which
> will always be true and will return 1st record always, it should in fact
> return NULL.
> As part of the fix, start looking each record only if the sequence number
> lies in the list else return NULL.
> There is one more check added, driver look for the start marker record to
> handle tcp packets which are before the tls offload start sequence number,
> hence return 1st record if the record is tls start marker and seq number is
> before the 1st record's starting sequence number.
> 
> Fixes: e8f69799810c ("net/tls: Add generic NIC offload infrastructure")
> Signed-off-by: Rohit Maheshwari <rohitm@chelsio.com>

Reviewed-by: Jakub Kicinski <kuba@kernel.org>

FWIW you could have kept the review tag from Boris, the change to v4 
was minor.

Thanks!

  reply	other threads:[~2020-02-19 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19  4:10 [PATCH net v4] net/tls: Fix to avoid gettig invalid tls record Rohit Maheshwari
2020-02-19 19:28 ` Jakub Kicinski [this message]
2020-02-20  0:32 ` David Miller

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=20200219112824.4c7e31fc@kicinski-fedora-PC1C0HJN \
    --to=kuba@kernel.org \
    --cc=aviadye@mellanox.com \
    --cc=borisp@mellanox.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=manojmalviya@chelsio.com \
    --cc=netdev@vger.kernel.org \
    --cc=rohitm@chelsio.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