As of a4dcb80458dff521ac8767b0e0067c1e14fab98d, ndn_lite_default_hmac_load_key function invokes:
memcpy(hmac_key->key_value, key_value, key_size);
hmac_key->key_value is a 32-byte fixed size buffer. key_size comes from user and is unverified.
Therefore, an attacker can trigger a buffer overflow using this function.
Recommendation is to use memcpy_s instead of manual checking and memcpy, if C11 is allowed (see #12).
As of a4dcb80458dff521ac8767b0e0067c1e14fab98d,
ndn_lite_default_hmac_load_key
function invokes:hmac_key->key_value
is a 32-byte fixed size buffer.key_size
comes from user and is unverified. Therefore, an attacker can trigger a buffer overflow using this function.Recommendation is to use
memcpy_s
instead of manual checking andmemcpy
, if C11 is allowed (see #12).