Integer Overflow in wolfCrypt CMAC Implementation Affects wolfSSL
CVE-2026-5477
What is CVE-2026-5477?
An integer overflow vulnerability has been detected in the CMAC implementation of wolfCrypt within the wolfSSL library. The flaw is rooted in the function wc_CmacUpdate, which mistakenly skips crucial XOR-chaining for the first block due to a guard condition based on the total size (cmac->totalSz). This condition is susceptible to wrapping after processing a large number of blocks (specifically, after exceeding 4 GiB). Consequently, this allows two messages with a shared suffix post-4 GiB threshold to yield identical CMAC tags. This zero-work prefix-substitution forgery poses a significant risk to data integrity. The resolution involved removing the problematic guard condition while preserving the integrity of the initial block by ensuring the digest initializes to zero through the function wc_InitCmac_ex.
Affected Version(s)
wolfSSL 0 <= 5.9.0
References
CVSS V4
Timeline
Vulnerability published
Vulnerability Reserved
