public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH proxmox v3 0/5] Fix #6738: Improve TLS Handshake Handling & Error Logging
@ 2026-11-10 11:07 Max R. Carrara
  2026-11-10 11:07 ` [PATCH proxmox v3 1/5] rest-server: connection: use enum for TLS handshake check result Max R. Carrara
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Max R. Carrara @ 2026-11-10 11:07 UTC (permalink / raw)
  To: pbs-devel

Fix #6738: Improve TLS Handshake Handling & Error Logging - v3
==============================================================

This is a slightly bigger refresh of an older patch (see below) that
reduces the noisiness of TLS handshake errors, in particular when health
checks are only opening and closing connections without sending any
data.

The reason why I'm "revamping" this is to make the code more readable
overall, add tests, and also to fix a very rare, but possible race
condition, where we inspect the incoming buffer too quickly while the
client is still sending data -- see patch #4 for the details.

Patch #5 contains the actual fix for #6738.

I smoke tested all of this on my local development setup, but another
look certainly wouldn't hurt here.

Notable Changes
---------------

- Use a proper `enum` instead of an `Option<bool>` to represent the
  outcome of the TLS handshake check (patch #1)

- Add tests for the TLS handshake handling (patch #2)

- Fix race condition where we inspect the incoming buffer too quickly
  while the client is still sending data (patch #4)

  Note that this race condition is only really possible if we received
  less than 5 bytes from the client initially. I'm not sure when this
  would ever "naturally" occur, but some misbehaved script or perhaps
  some kind of "streaming" proxy could maybe trigger this.

Previous Versions
-----------------

v1: https://lore.proxmox.com/pbs-devel/20250910154041.1032251-1-m.carrara@proxmox.com/
v2: https://lore.proxmox.com/pbs-devel/20260427134051.557840-1-m.carrara@proxmox.com/

Summary of Changes
------------------


proxmox:

Max R. Carrara (5):
  rest-server: connection: use enum for TLS handshake check result
  rest-server: connection: add tests for TLS handshake check
  rest-server: connection: log cause of TLS handshake check errors
  rest-server: connection: avoid dropping clients during TLS check
  fix #6738: rest-server: log early closed connections at debug level

 proxmox-rest-server/src/connection.rs | 289 +++++++++++++++++++++++---
 1 file changed, 263 insertions(+), 26 deletions(-)


Summary over all repositories:
  1 files changed, 263 insertions(+), 26 deletions(-)

-- 
Generated by murpp 0.12.0




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

end of thread, other threads:[~2026-11-10 11:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-10 11:07 [PATCH proxmox v3 0/5] Fix #6738: Improve TLS Handshake Handling & Error Logging Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 1/5] rest-server: connection: use enum for TLS handshake check result Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 2/5] rest-server: connection: add tests for TLS handshake check Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 3/5] rest-server: connection: log cause of TLS handshake check errors Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 4/5] rest-server: connection: avoid dropping clients during TLS check Max R. Carrara
2026-11-10 11:07 ` [PATCH proxmox v3 5/5] fix #6738: rest-server: log early closed connections at debug level Max R. Carrara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal