Skip to content

(Non-conformance) Stateless Cookie Exchange #259

@bathooman

Description

@bathooman

Description

  • Type: Non-conformance Bug
  • Priority: Minor

Non-conformance Bug

Version: development branch

Expected behavior
The DTLS 1.2 RFC specifies the following requirement regarding stateless cookie exchange :

The DTLS server SHOULD generate cookies in such a way that they can be verified without retaining any per-client state on the server.

Actual behavior

TinyDTLS stores the record sequence number of the initial ClientHello and discards any subsequent records that duplicate this sequence number. However, in a truly stateless exchange, no information from the initial ClientHello should be retained. In the attached handshake trace, the record containing the ClientKeyExchange message uses the same record sequence number as the initial ClientHello. As shown in the log below, this results in the record being discarded.

stateless-cookie-exchange.zip

Log

May 15 13:08:00 INFO received message (117 bytes), starting with 'handshake', epoch 0
May 15 13:08:00 INFO handshake message epoch 0
May 15 13:08:00 INFO got 'handshake' epoch 0 sequence 0 (42 bytes)
May 15 13:08:00 DEBG dtls_handle_message: FOUND PEER
May 15 13:08:00 DEBG bitfield is ffffffffffffffff sequence base 1 rseqn 0
May 15 13:08:00 DEBG Drop: duplicate packet arrived (bitfield)```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions