All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vakul Garg <vakul.garg@nxp.com>
To: Dave Watson <davejwatson@fb.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Peter Doliwa <peter.doliwa@nxp.com>,
	Boris Pismenny <borisp@mellanox.com>
Subject: RE: Security enhancement proposal for kernel TLS
Date: Thu, 2 Aug 2018 17:23:44 +0000	[thread overview]
Message-ID: <DB7PR04MB42522A3C774880D4532F38728B2C0@DB7PR04MB4252.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20180801204647.GA6180@davejwatson-mba.dhcp.thefacebook.com>



> -----Original Message-----
> From: Dave Watson [mailto:davejwatson@fb.com]
> Sent: Thursday, August 2, 2018 2:17 AM
> To: Vakul Garg <vakul.garg@nxp.com>
> Cc: netdev@vger.kernel.org; Peter Doliwa <peter.doliwa@nxp.com>; Boris
> Pismenny <borisp@mellanox.com>
> Subject: Re: Security enhancement proposal for kernel TLS
> 
> On 07/31/18 10:45 AM, Vakul Garg wrote:
> > > > IIUC, with the upstream implementation of tls record layer in
> > > > kernel, the decryption of tls FINISHED message happens in kernel.
> > > > Therefore the keys are already being sent to kernel tls socket
> > > > before handshake is
> > > completed.
> > >
> > > This is incorrect.
> >
> > Let us first reach a common ground on this.
> >
> >  The kernel TLS implementation can decrypt only after setting the keys on
> the socket.
> > The TLS message 'finished' (which is encrypted) is received after receiving
> 'CCS'
> > message. After the user space  TLS library receives CCS message, it
> > sets the keys on kernel TLS socket. Therefore, the next message in the
> > socket receive queue which is TLS finished gets decrypted in kernel only.
> >
> > Please refer to following Boris's patch on openssl. The  commit log says:
> > " We choose to set this option at the earliest - just after CCS is complete".
> 
> I agree that Boris' patch does what you say it does - it sets keys immediately
> after CCS instead of after FINISHED message.  I disagree that the kernel tls
> implementation currently requires that specific ordering, nor do I think that it
> should require that ordering.

The current kernel implementation assumes record sequence number to start from '0'.
If keys have to be set after FINISHED message, then record sequence number need to
be communicated from user space TLS stack to kernel. IIRC, sequence number is not 
part of the interface through which key is transferred.

  reply	other threads:[~2018-08-02 19:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-22 12:49 Security enhancement proposal for kernel TLS Vakul Garg
2018-07-25 15:59 ` Dave Watson
2018-07-30  6:31   ` Vakul Garg
2018-07-30 21:16     ` Dave Watson
2018-07-31 10:45       ` Vakul Garg
2018-08-01 20:46         ` Dave Watson
2018-08-02 17:23           ` Vakul Garg [this message]
2018-08-03 15:46             ` Dave Watson

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=DB7PR04MB42522A3C774880D4532F38728B2C0@DB7PR04MB4252.eurprd04.prod.outlook.com \
    --to=vakul.garg@nxp.com \
    --cc=borisp@mellanox.com \
    --cc=davejwatson@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=peter.doliwa@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.