Skip to content
Commit 814433d4 authored by Siddharth Chandrasekaran's avatar Siddharth Chandrasekaran Committed by Carles Cufí
Browse files

mgmt/osdp: Make sure we decrypt atleast one block



OSDP secure channel message blocks are terminated with a 0x80. This means
that even for zero length messages, we would have at least one block of
encrypted data to decrypt (since message blocks are rounded up to the next
16 byte boundary). The current length assertion checks for 16 byte
alignment but a malicious peer could send a specially crafted packet with
zero length blocks. Fix this issue by adding check for length == 0 case.

Signed-off-by: default avatarSiddharth Chandrasekaran <sidcha.dev@gmail.com>
parent 0effd82b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment