Skip to content
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

Fragment Length, Fragment Offset Non-conformance bug #73

Closed
bathooman opened this issue Apr 20, 2021 · 2 comments
Closed

Fragment Length, Fragment Offset Non-conformance bug #73

bathooman opened this issue Apr 20, 2021 · 2 comments

Comments

@bathooman
Copy link

Description

  • Type: Non-conformance Bug
  • Priority: Minor

Non-conformance Bug

Version: development branch

Expected behavior
The DTLS RFC specifies the following requirement regarding the fragment offset and fragment length when fragmentation is not present:

An unfragmented message is a degenerate case with fragment_offset=0 and fragment_length=length

Actual behavior
One can complete a handshake with the following values for the fragment_offset and fragment_length:

CKE.message_length = 17
CKE.fragment_length = 16777198
CKE.fragment_offset = 255

The problem also exists when the server sends records with non-compliant Fragment_offset and fragment_length.

I have attached the handshake trace for the mentioned non-conformance. You clearly see that the handshake proceeds while the Fragment_offset and fragment_length are invalid.
capture.zip

@mrdeep1
Copy link
Contributor

mrdeep1 commented May 18, 2021

Your code base is not the current develop branch as you indicate (fragment_offset is not used). If #64 is merged into the develop branch, then the non-conformance you mention will get caught. Even with #62 I am not sure where the non conformance is (24 bit masking) that allows the bad packet to get through.. The packet capture is telling me Fatal Alert: Handshake Failure has happened (sent back by the Server), but am unable to decrypt the encrypted handshakes.

@bathooman
Copy link
Author

The problem is solved now. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants