From: David Miller <davem@davemloft.net>
To: rohitm@chelsio.com
Cc: kuba@kernel.org, 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 16:32:50 -0800 (PST) [thread overview]
Message-ID: <20200219.163250.1284615020212149795.davem@davemloft.net> (raw)
In-Reply-To: <20200219041022.22701-1-rohitm@chelsio.com>
From: Rohit Maheshwari <rohitm@chelsio.com>
Date: Wed, 19 Feb 2020 09:40:22 +0530
> 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>
Applied and queued up for -stable.
prev parent reply other threads:[~2020-02-20 0:32 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
2020-02-20 0:32 ` 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=20200219.163250.1284615020212149795.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aviadye@mellanox.com \
--cc=borisp@mellanox.com \
--cc=daniel@iogearbox.net \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--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