-
Notifications
You must be signed in to change notification settings - Fork 58
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
OpenSSL 3.1 fails to connect to TinyDTLS server #175
Comments
Openssl is anyway a bad choice for IoT ;-). |
That maybe, but my (PSK) libcoap regression tests are all messed up when running Ubuntu 22! |
I'm running still 20.04. |
Not sure, how to proceed with that in general: In my opinion (the discussion have been a couple of years ago in Eclipse/Californium), renegotiation was in too many cases misinterpreted as a way to overcome broken DTLS in the context of NATs. It doesn't work there. So, the first question is more:
My interpretation of RFC5746 is, that it doesn't support to implement "no renegotiation at all". It looks, like the way to do that is to "negotiate the secure renegotiation" and then block, when that is really requested. Depending on the outcome, if renegotiation must be supported, I will try to ask the tls list about the way, to indicate, that renegotiation isn't supported at all. |
Not that I am aware of. It all appears to hinge around
I'm not comfortable with just somehow enabling this. I have to assume that the OpenSSL people thought this through. |
Unfortunately, I assume, that a lot of TLS stuff is taken to DTLS without considering UDP. AFAIK, openssl doesn't go for the In cases where a server believes it has an existing association on a If we then really consider the threat of a renegotiation attack as mitigated by RFC5746, UDP and NATs will change the threat fundamentally. Assuming the (simplified) attack is based on the lose coupled triple of (ip endpoint, appl. data, security context), using functions as "receive(ip, data)" and "context(ip, context)" but not "receive(ip, data, context)", then RFC5746 can't mitigate this attack for DTLS 1.2. So, I still consider to use More requires then also more support from others asking and discussing the topic in the tls-mailing list. |
Thanks for the logs. |
Thanks for doing all the digging around. Not entirely sure how clear the mud is getting! The following in the appropriate place in libcoap code cures the issue I am seeing.
Apparently I feel a lot more comfortable with "my" clients being able to talk to "RFC 5746 unpatched" servers, but not to support access from clients to "my" coded server by setting |
The real issue is, that RFC 5746 does not consider "no renegotiation at all". |
To prevent the renegotiation attack [RFC5746], this specification In order to enable clients to probe, even servers that do not support So the extensions in RFC5746 are more indicating a updated implementation, not really the feature. I would propose to send a e-mail to the tinydtls mailing list and open an issue to discuss removing the renegotiation as of RFC 7925. Check, if someone requires it. Are you OK with that? And then add the minimal RFC5764 support, if renegotiation could be removed. If renegotiation could not be removed, it requires a "full RFC5746", even if that in my opinion doesn't help at all for DTLS 1.2 ;-). |
Minimal RFC5764 sending back a 0 length "renegotiated_connection" field works for me (and what GnuTLS and MbedTLS do). |
Thanks @boaks and @mrdeep1 for your assessment and proposed solution. I agree with boaks's proposal in following RFC 7925 (it removes renegotiation exactly because it is too difficult to get it right), and add the minimal RFC 5746 support to improve interoperability. Checking on the mailing list first is always good practice, so go ahead (from another context, I had not the feeling that people depend on renegotiation). |
See issue #176 . The e-mail was sent. |
I implemented RFC 5746 for Eclipse/Californium. My first impression using TLS_EMPTY_RENEGOTIATION_INFO_SCSV is, that it will be easier with/after PR #147 / #148. WDYT? |
I just checked OpenSSL (using libcoap) against Eclipse/Californium using PSK which works as expected. I'm not convinced that we need to fully implement RFC 5746 - just a subset and if a subsequent renegotiation comes along refuse to handle it. That said, as the SCSV is a pseudo algorithm, without revisiting your CCM code changes, it makes sense that it is a part of that work. |
Against the Californium Sandbox?
I always agreed, that we only need such a minimal version. Especially, if we remove renegotiation at all (see discussion above and issue #176). The minimal version includes the TLS_EMPTY_RENEGOTIATION_INFO_SCSV for the client to indicate support for RFC5746, and the empty RenegotiationInfoExtension for the server to response to that request. |
Doh - just realized I was running it with my fixed code. Yes it does fail otherwise. For the SCSV, yes you are correct. |
I update the Californium sandbox today. |
(Californium's sandbox is updated. It supports now a minimal version of RFC5746.) |
Thanks - works with my unpatched libcoap code. |
PR #181 adds RFC5746 minimal version support. |
Yes, this works as expected. Thanks. |
With the server running as
This works fine for OpenSSL < 3.0, but fails for >= 3.0
It appears that support for RFC 5746 is needed as per CAN-2009-3555.
The text was updated successfully, but these errors were encountered: