CVE-2024-9355: Unchecked Cgo Hmac Return

The return value of an underlying C HMAC function (e.g., HMAC_Update, HMAC_Final) is not checked. If this function fails, the error is ignored and execution proceeds, potentially returning an uninitialized or zero-filled buffer instead of a valid HMAC sum. Always check the return value of CGo cryptographic functions to prevent fallback to zero-filled buffers

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Goβ
greprules fetch cve-2024-9355-unchecked-cgo-hmac-return --engine opengrep

Description

The return value of an underlying C HMAC function (e.g., HMAC_Update, HMAC_Final) is not checked. If this function fails, the error is ignored and execution proceeds, potentially returning an uninitialized or zero-filled buffer instead of a valid HMAC sum. Always check the return value of CGo cryptographic functions to prevent fallback to zero-filled buffers