Skip to content

[Bug]: DTLS 1.3 AEAD limit macros are half their documented values #11973

Open

Description

@HMBSbige

Contact Details

No response

Version

master (252789b); present since v5.5.1, including v5.9.4

Description

Three DTLS 1.3 AEAD limits in wolfssl/internal.h are half the values stated in their own comments, which cite RFC 9147:

wolfssl/wolfssl/internal.h

Lines 1458 to 1469 in 252789b

/* Limit is 2^23
* https://www.rfc-editor.org/rfc/rfc9147.html#name-integrity-limits */
#define DTLS_AEAD_AES_CCM_LIMIT w64From32(0, 1 << 22)
/* Limit is 2^36
* https://www.rfc-editor.org/rfc/rfc9147.html#name-aead-limits */
#define DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMIT w64From32(1 << 3, 0)
#define DTLS_AEAD_AES_GCM_CHACHA_FAIL_KU_LIMIT w64From32(1 << 2, 0)
/* Limit is 2^7
* https://www.rfc-editor.org/rfc/rfc9147.html#name-limits-for-aead_aes_128_ccm */
#define DTLS_AEAD_AES_CCM_8_FAIL_LIMIT w64From32(0, 1 << 6)
#define DTLS_AEAD_AES_CCM_8_FAIL_KU_LIMIT w64From32(0, 1 << 5)

Macro Comment Actual value
DTLS_AEAD_AES_CCM_LIMIT 2^23 w64From32(0, 1 << 22) = 2^22
DTLS_AEAD_AES_GCM_CHACHA_FAIL_LIMIT 2^36 w64From32(1 << 3, 0) = 2^35
DTLS_AEAD_AES_CCM_8_FAIL_LIMIT 2^7 w64From32(0, 1 << 6) = 2^6

w64From32(hi, lo) is (hi << 32) | lo, so each value is half of what its comment states. The matching *_FAIL_KU_LIMIT macros are in turn half of these hard limits.

Is this intentional?

Reproduction steps

No response

Relevant log output

Activity

  1. julek-wolfssl commented on Nov 3, 2026

    @julek-wolfssl
    Member

    Hi @HMBSbige Thank you for the report. The issue is solved in pull request #11975.

    Juliusz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions