Files
libcoap/tests
Scorpion dc2f20b55b OSCORE: Reject ciphertext too short for the AEAD tag
coap_oscore_decrypt_pdu() only checked encrypt_len == 0 before computing
encrypt_len - tag_len (size_t), so a protected payload shorter than the
tag underflowed to a huge value used for plain_pdu->used_size and the
AEAD output buffer size. This is reached before the payload is
authenticated.

Reject a payload that cannot hold the tag plus the inner Code byte up
front and handle it like any other decryption failure: a request is
answered with 4.00 "Decryption failed" and the replay state is rolled
back, so an unauthenticated short request cannot advance the replay
window. Also guard the subtraction in cose_encrypt0_decrypt().

Add a regression test for every payload length from one byte through
the tag length.
2026-10-22 13:06:45 +01:00
..
2026-01-05 10:37:26 +00:00
2026-01-05 10:37:26 +00:00
2026-08-08 12:05:03 +01:00
2026-01-05 10:37:26 +00:00
2026-06-05 15:22:38 +01:00
2026-04-18 09:11:19 +01:00