Skip to content

Commit 060a2b3

Browse files
committed
Fix DTLS 1.3 unified header fixed bits mask
DTLS13_FIXED_BITS_MASK used 0x111 (hex 273) instead of 0x7 (decimal 7, binary 111). Per RFC 9147 Section 4, the top 3 bits of the unified header flags byte must be 001. The incorrect hex value caused the mask to only check bit 5 instead of bits 5, 6, and 7, allowing bytes with bits 6 or 7 set to be misidentified as unified DTLS 1.3 headers.
1 parent 00de3f3 commit 060a2b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/dtls13.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ typedef struct Dtls13RecordPlaintextHeader {
9393
#define DTLS13_SEQ_8_LEN 1
9494

9595
/* fixed bits mask to detect unified header */
96-
#define DTLS13_FIXED_BITS_MASK (0x111 << 5)
96+
#define DTLS13_FIXED_BITS_MASK (0x7 << 5)
9797
/* fixed bits value to detect unified header */
9898
#define DTLS13_FIXED_BITS (0x1 << 5)
9999
/* ConnectionID present bit in the unified header flags */

0 commit comments

Comments
 (0)