
Problem with TLS when attempting to connect many clients simultaneously.

SDK client: Node.js MQTT client 
Protocol: SSL with certs 

Reproduction: Attempting to connect multiple clients simultaneously using the TLS protocol and a certificate.

Result: The broker becomes blocked and unable to connect to any client. The only solution is to restart the server."



debug logs mode 
show only these lines at each attempt 
2024-04-23 07:32:00 [14481] WARN  /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:310 tlstran_pipe_nego_cb: nego aio error: Cryptographic error
2024-04-23 07:32:00 [14481] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:448 tlstran_pipe_nego_cb: connect nego error rv: Cryptographic error(26)

tlstran_pipe_nego_cb: connect nego error rv: Cryptographic error
This is a GitHub Issue
repo:nanomq
owner:emqx
Title : tlstran_pipe_nego_cb: connect nego error rv: Cryptographic error
Issue date:

--- start body ---

Problem with TLS when attempting to connect many clients simultaneously.

SDK client: Node.js MQTT client 
Protocol: SSL with certs 

Reproduction: Attempting to connect multiple clients simultaneously using the TLS protocol and a certificate.

Result: The broker becomes blocked and unable to connect to any client. The only solution is to restart the server."



debug logs mode 
show only these lines at each attempt 
2024-04-23 07:32:00 [14481] WARN  /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:310 tlstran_pipe_nego_cb: nego aio error: Cryptographic error
2024-04-23 07:32:00 [14481] ERROR /home/runner/work/nanomq/nanomq/nng/src/sp/transport/mqtts/broker_tls.c:448 tlstran_pipe_nego_cb: connect nego error rv: Cryptographic error(26)

--- end body ---

The issue indicates a potential vulnerability related to the TLS negotiation process in the nanomq broker when handling multiple simultaneous client connections. The broker becomes blocked and unable to connect to any clients, which could be exploited to cause a Denial of Service (DoS) by overwhelming the server with connection attempts.