CVE-2026-5477

NameCVE-2026-5477
DescriptionAn integer overflow existed in the wolfCrypt CMAC implementation, that could be exploited to forge CMAC tags. The function wc_CmacUpdate used the guard `if (cmac->totalSz != 0)` to skip XOR-chaining on the first block (where digest is all-zeros and the XOR is a no-op). However, totalSz is word32 and wraps to zero after 2^28 block flushes (4 GiB), causing the guard to erroneously discard the live CBC-MAC chain state. Any two messages sharing a common suffix beyond the 4 GiB mark then produce identical CMAC tags, enabling a zero-work prefix-substitution forgery. The fix removes the guard, making the XOR unconditional; the no-op property on the first block is preserved because digest is zero-initialized by wc_InitCmac_ex.
SourceCVE (at NVD; CERT, ENISA, LWN, oss-sec, fulldisc, Debian ELTS, Red Hat, Ubuntu, Gentoo, SUSE bugzilla/CVE, GitHub advisories/code/issues, web search, more)
Debian Bugs1133835

Vulnerable and fixed packages

The table below lists information on source packages.

Source PackageReleaseVersionStatus
wolfssl (PTS)bullseye4.6.0+p1-0+deb11u2vulnerable
bookworm5.5.4-2+deb12u2vulnerable
trixie5.7.2-0.1+deb13u1vulnerable
forky, sid5.9.1-0.1fixed

The information below is based on the following data on fixed versions.

PackageTypeReleaseFixed VersionUrgencyOriginDebian Bugs
wolfsslsource(unstable)5.9.1-0.11133835

Notes

[trixie] - wolfssl <no-dsa> (Minor issue)
[bookworm] - wolfssl <no-dsa> (Minor issue)
[bullseye] - wolfssl <postponed> (Minor issue)
https://github.com/wolfSSL/wolfssl/pull/10102
Fixed by (merge): https://github.com/wolfSSL/wolfssl/commit/32502e9963a1db43fa42bd1e6edaa27fd8168ad9 (v5.9.1-stable)

Search for package or bug name: Reporting problems