linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] NVMe/TLS connection issues to SPDK
@ 2025-07-21  2:17 Chris Leech
  2025-07-21  2:17 ` [PATCH 1/1] libnvme: TLS PSK derivation fixes Chris Leech
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Chris Leech @ 2025-07-21  2:17 UTC (permalink / raw)
  To: linux-nvme
  Cc: Hannes Reinecke, Daniel Wagner, Prashanth Nayak, John Meneghini

I was attempting to debug connecting the Linux driver / libnvme /
ktls-utils host stack to the SPDK nvmf_tgt over TLS, and ran into some
issues.

The TLS connection fails to complete a handshake because the TLS PSKs
are different. The NVMe/TCP specified key derivation steps from the
configured interchange format, to a retained PSK and finally the TLS
PSK, is implemented incompatibly in libnvme and SPDK.  After some
investigation, I believe the SPDK implementation to be correct and am
providing a libnvme patch to match it. With libnvme modified, I see the
TLS handshake complete in tlshd.

(Note that this was tested using the obsolete "version 0" PSK Identity
and TLS PSK derivation from the TCP transport 1.0 specification, as SPDK
has not been updated with the "version 1" changes)

The NVMe/TCP host driver then quickly fails when SPDK sends a TLS "New
Session Ticket" message before ICResp.

While possibly pointless due to the transport specification prohibition
on session resumption and 0-RTT data, I don't think this is necessarily
wrong and the host driver should be able to safely ignore it and
continue.

I'm working on testing that out, but a more general TLS message demuxing
layer to deal with post-handshake messages other than application data
may be wanted to avoid sprinkling checks around the nvme driver.

Chris Leech (1):
  libnvme: TLS PSK derivation fixes

 src/nvme/linux.c | 86 ++++++++++++++++++++++++++++++++----------------
 1 file changed, 57 insertions(+), 29 deletions(-)

-- 
2.50.1



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-08-26 14:37 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21  2:17 [PATCH 0/1] NVMe/TLS connection issues to SPDK Chris Leech
2025-07-21  2:17 ` [PATCH 1/1] libnvme: TLS PSK derivation fixes Chris Leech
2025-07-21  6:36   ` Hannes Reinecke
2025-07-21 15:31     ` Chris Leech
2025-07-25  9:36       ` Hannes Reinecke
2025-07-25 18:08         ` Chris Leech
2025-07-28  7:12           ` Hannes Reinecke
2025-08-08 16:18             ` John Meneghini
2025-08-12  4:33             ` Chris Leech
2025-08-18  9:42               ` Hannes Reinecke
2025-08-20  8:10               ` Daniel Wagner
2025-08-20  8:22                 ` Hannes Reinecke
2025-08-26 14:09                   ` John Meneghini
2025-07-21  7:11 ` [PATCH 0/1] NVMe/TLS connection issues to SPDK Hannes Reinecke
2025-07-21 15:44   ` Chris Leech
2025-07-22  6:27     ` Hannes Reinecke
2025-07-24 14:35       ` Daniel Wagner
2025-07-24 15:07         ` Chris Leech
2025-07-24 15:37           ` Daniel Wagner
2025-08-12 22:05 ` Chris Leech
2025-08-12 22:11 ` [RFC PATCH 1/2] crypto: hkdf: add hkdf_expand_label() Chris Leech
2025-08-18  9:44   ` Hannes Reinecke

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).