Vulnerability record
crypto: rsassa-pkcs1 - reject undersized keys when verifying
In the Linux kernel, the following vulnerability has been resolved:
crypto: rsassa-pkcs1 - reject undersized keys when verifying
rsassa_pkcs1_verify() accepts any nonzero key size.
With a one-byte key and a zero RSA result, the leading-zero handling decrements dst_len to zero and advances out_buf past the allocation. The next out_buf[0] access reads out of bounds.
KASAN reports:
BUG: KASAN: slab-out-of-bounds in rsassa_pkcs1_verify+0x79d/0x900
Read of size 1 at addr ...
The buggy address is located 0 bytes to the right of
allocated 73-byte region [...]
Reject keys…
Remediation
No fixed version has been published for this vulnerability yet. Check the references below for vendor advisories, workarounds and mitigation guidance.
Sources