-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SecureSocket does not validate the name against the CN/SAN of the certificate #1421
Comments
You're going to make me go back and relearn how this is supposed to work. ;) Will take a look but understand that TLS matters are seldom quick to resolve. |
As I'm sure you recognize, it's an attack vector since there is no validation that the domain name matches the certificate, but it doesn't affect the actual communications. While likely best to be implemented in I did some research on the requirements, in case it might help. There are two fields that contain the domain info:
The Also worth noting, an alternate format instead of commas on the
Let me know if I can help further. This is not a high priority for me (lots of time before my code reaches the public) - but it is an attack vector that seems worth addressing eventually. |
@cmidgley – yes, I understood that this is a potential vulnerability. As such, it should be solved in the TLS stack to benefit all clients. |
Build environment: Windows
Moddable SDK version: 5.0.1
Target device: ESP32, Simulator (Win)
Description
A
SecureSocket
connection can be made to a server even when the connection name does not match the certificate names (CN/SAN).The connection succeeds and communicates without errors over the secure connection.
Steps to Reproduce
examples/network/socket/socketsecure
example.com
(93.184.215.14
as of this write-up), which does not match the certificate. Alternatively, you can set up a DNS entry that resolves to that address and then use the DNS name instead of the IP address.Line before changing:
Line after changing:
Other information
If the certificate is expired (or time is not set on ESP32; can't easily simulate on
win
asTime.set(...)
isn't supported), or the certificate root is invalid, it correctly rejects the session.The text was updated successfully, but these errors were encountered: