Linux
crypto: caam - fix overflow on long hmac keys
In the Linux kernel, the following vulnerability has been resolved: crypto: caam - fix overflow on long hmac keys When a key longer than block size is supplied, it is copied and then hashed into the real key. The memory allocated for the copy needs to be rounded to DMA cache alignment, as otherwise the hashed key may corrupt neighbouring memory. The copying is performed using kmemdup, however this leads to an overflow: reading more bytes (aligned_len - keylen) from the keylen source buffer. Fix this by replacing kmemdup with kmalloc, followed by memcpy.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 199354d7fb6eaa2cc5bb650af0bca624baffee35, < 31022cfde5235c45fa765f0aabeff5f0652852f2
- >= 199354d7fb6eaa2cc5bb650af0bca624baffee35, < c2fb4984fe09fc176fe4c12d5e3edf626df6511d
- >= 199354d7fb6eaa2cc5bb650af0bca624baffee35, < aa545df011338df13f0833fc1fabcb15c0521959
- >= 199354d7fb6eaa2cc5bb650af0bca624baffee35, < cebc5ebd958346195b77f42d0cd5141b4e448fae
- >= 199354d7fb6eaa2cc5bb650af0bca624baffee35, < 80688afb9c35b3934ce2d6be9973758915e2e0ef
Fixed in 31022cfde5235c45fa765f0aabeff5f0652852f2, c2fb4984fe09fc176fe4c12d5e3edf626df6511d, aa545df011338df13f0833fc1fabcb15c0521959, cebc5ebd958346195b77f42d0cd5141b4e448fae, 80688afb9c35b3934ce2d6be9973758915e2e0ef
- 6.3
Fixed in 0, 6.6.134, 6.12.81, 6.18.22, 6.19.12, 7.0
Mitigation
Upgrade Linux to 31022cfde5235c45fa765f0aabeff5f0652852f2 or c2fb4984fe09fc176fe4c12d5e3edf626df6511d or aa545df011338df13f0833fc1fabcb15c0521959 or cebc5ebd958346195b77f42d0cd5141b4e448fae or 80688afb9c35b3934ce2d6be9973758915e2e0ef or later.
Upgrade Linux to 0 or 6.6.134 or 6.12.81 or 6.18.22 or 6.19.12 or 7.0 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.