nerves_hub_web denial of service in device certificate verification
nerves-hub nerves_hub_web
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
| No fix yet |
nerves-hub nerves_hub_web
| Product | Affected | Fixed in |
|---|---|---|
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
| No fix yet |
| nerves-hub nerves_hub_web |
| No fix yet |
Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in device certificate verification in nerves-hub nerves_hub_web allows an unauthenticated remote attacker to cause a denial of service via a TLS client certificate whose CA is not registered. When a client certificate chains to a root in the device endpoint's trust store but no CA in the chain is registered in NervesHub, NervesHub.SSL.decide/2 refuses it with the reason :unknown_ca. Erlang/OTP ssl reads that reason as a missing trust anchor, looks for an alternative root, finds the same root and validates again without end. The handshake process queries the database on each pass and keeps running after the client disconnects, until the node restarts.
The device endpoint trusts the public roots from CAStore unless DEVICE_SSL_CACERTFILE is set, so a client certificate from a public CA whose chain allows client authentication is sufficient. A chain that ends at a root outside the trust store is refused once.
This issue affects nerves_hub: from 1.0.0 before 2.5.4.
From the CVE record · EEF
An infinite loop in device certificate verification can let an unauthenticated remote attacker cause a denial of service. It occurs when a TLS client certificate chains to a trusted root but no CA in the chain is registered in NervesHub; repeated validation queries the database and continues after the client disconnects, until the node restarts. A chain ending at a root outside the trust store is refused once.
Operators running nerves_hub versions 1.0.0 through versions before 2.5.4 should check their deployments.