libressl / portable

LibreSSL Portable itself. This includes the build scaffold and compatibility layer that builds portable LibreSSL from the OpenBSD source code. Pull requests or patches sent to tech@openbsd.org are welcome.
https://www.libressl.org
1.36k stars 267 forks source link

TLS-RFC Compliance #675

Open mmaehren opened 3 years ago

mmaehren commented 3 years ago

Hi, we (@jurajsomorovsky @ic0ns @mmaehren @XoMEX @Kavakuo) are performing an analysis of the RFC-compliance of open-source TLS implementations. Below we list our findings for this implementation. We admit that some are rather nit-picky, but we added them for the sake of completeness. We tried to keep the descriptions brief and didn’t want to spam the issues section so feel free to split up the list into individual issues as you see fit. If you disagree with our interpretation of certain RFC statements, please leave feedback as we’re interested in your view.

Our results apply to the default configuration of version 3.2.3. We used the example implementations for client and server.

[S] = Applies to server [C] = Applies to client [C+S] = Applies to both

Misc

Session not aborted

Only session closed but no alert sent

Different alert sent than defined by the RFC

kinichiro commented 3 years ago

I had checked the RFC quotes above.

mmaehren commented 3 years ago

Thank you, we will try to be more specific with the RFC chapters in the future.

botovq commented 3 years ago

On Thu, Jun 03, 2021 at 11:30:38PM -0700, mmaehren wrote:

Hi, we @.*** @ic0ns @mmaehren @XoMEX @Kavakuo) are performing an analysis of the RFC-compliance of open-source TLS implementations. Below we list our findings for this implementation. We admit that some are rather nit-picky, but we added them for the sake of completeness. We tried to keep the descriptions brief and didn’t want to spam the issues section so feel free to split up the list into individual issues as you see fit. If you disagree with our interpretation of certain RFC statements, please leave feedback as we’re interested in your view.

Thanks for the detailed report!

We are aware of a few of the issues you raised, in particular a number of the issues with closing the connection without sending an alert are known. Most others seem outright bugs - at least none of them stands out as obviously incorrect reading of the RFCs after a first glance.

A detailed assessment will need a bit of time.

Since you asked: we do not support the padding extension (we also don't support the GREASE, MaximumFragmentLength, or encrypt-then-MAC extensions - this is related to the missing abort when these are sent unexpectedly).

How did you test all this? I assume that your group developed a certain test suite. Would it be possible to have access to that so we can avoid redoing the work that was already done by you (for reproducing, testing and regression testing)?

Our results apply to the default configuration of version 3.2.3. We used the example implementations for client and server.

Did you test 3.2.3 or 3.3.3? If it was 3.2.3, this would be a bit unfortunate, this is about 8 months old with only a small security fix from 6 months ago. There has been quite a bit of development since - although it's unlikely that many of these issues would be addressed.

What does "we used the example implementations for the client and server" mean?

mmaehren commented 3 years ago

Yes, we developed an automated tool for this which we plan to release in the coming months. By 'example implementations' we meant the s_client and s_server equivalent of libressl.

mmaehren commented 3 years ago

Hey, based on the feedback we received from other developers, we split up the reports to separate cases where the RFC imposes restrictions on a sender but does not require the receiver to enforce these restrictions. You find these at the bottom of the comment. We removed reports of missing alerts in TLS 1.3 as sending alerts is explicitly stated as optional in RFC 8446. We didn't edit the initial report to avoid confusion.

Misc

Session not aborted

Only session closed but no alert sent

Different alert sent than defined by the RFC

Unenforced sender restrictions

In the following cases, the receiver is not explicitly required to terminate the connection upon detecting a misbehavior of the peer.

Based on the feedback we received from @tomato42, we removed the reported issue where a client sends an elliptic curve extension but does not offer an elliptic curve cipher suite as terminating the connection may cause interoperability issues.