eriptic / uoscore-uedhoc

C implementations for constrained (and non-constrained) devices of the IETF protocols OSCORE and EDHOC
Other
15 stars 15 forks source link

fix static analyzer warning: out of bound memory access #54

Closed kamil-kielbasa-aa closed 10 months ago

kamil-kielbasa-aa commented 11 months ago

If initiator side will send empty list with supported cipher suites then responder side will not check this corner case. This result in out of bound memory access on stack by suites_i[-1]. At the end access will be following: suites_i[255] because of uint8_t overflow.

Proposal solution is to return new error value: suites_i_list_empty.