Description
An 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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| wolfSSL | wolfSSL | ≤ 5.9.0 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 13 | wolfssl | No fix yet | — |
| Debian 12 | wolfssl | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | wolfssl | No fix yet | — |
| Ubuntu 26.04 LTS | wolfssl | No fix yet | — |
| Ubuntu 25.10 | wolfssl | No fix yet | — |
| Ubuntu 24.04 LTS | wolfssl | No fix yet | — |
| Ubuntu 22.04 LTS | wolfssl | No fix yet | — |
Show 3 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | wolfssl | No fix yet | — |
| Ubuntu 18.04 LTS | wolfssl | No fix yet | — |
| Ubuntu 16.04 LTS | wolfssl | No fix yet | — |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.24 | wolfssl | 5.9.1-r0 | — |
| Alpine v3.23 | wolfssl | 5.9.1-r0 | — |