Skip to content

dtls.c: fix length check in check_server_certificate.#267

Open
boaks wants to merge 1 commit intomainfrom
fix_length_check_server_cert
Open

dtls.c: fix length check in check_server_certificate.#267
boaks wants to merge 1 commit intomainfrom
fix_length_check_server_cert

Conversation

@boaks
Copy link
Contributor

@boaks boaks commented Mar 17, 2026

Fixes potential out-of-bounds read.

Fixes potential out-of-bounds read.

Signed-off-by: Achim Kraus <achim.kraus@cloudcoap.net>
@boaks
Copy link
Contributor Author

boaks commented Mar 17, 2026

@obgm

Please a fast LGTM, thanks!


data += DTLS_HS_LENGTH;

if (data_length < DTLS_HS_LENGTH + DTLS_EC_SUBJECTPUBLICKEY_SIZE + sizeof(uint24)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general but I think this check should come before doing the update_hs_hash in line 3433 .

Otherwise, LGTM.

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

Successfully merging this pull request may close these issues.

2 participants