Executive brief
The Linux kernel's RK3288 cryptographic hash engine driver did not properly handle timeout conditions when the hash processing unit failed to become idle. If the engine stalled, the driver would incorrectly report successful hashing operations with potentially corrupted or stale digest values, affecting the integrity of hash-based operations on systems using this hardware accelerator.
Technical details
This is a logic error in the RK3288 AHash driver (drivers/crypto/rockchip/rk3288_crypto_ahash.c). The rk_hash_run() function calls readl_poll_timeout() to wait for the RK_CRYPTO_HASH_STS register to become idle (value 0) after a DMA transfer, but was ignoring the function's return value. If the hash engine became stuck and the polling timed out, the driver would still proceed to read digest registers and complete the request with a success status, potentially delivering incorrect hash results. The fix stores the poll result and exits early with a timeout error if the condition occurs, preventing invalid digests from being returned.
Affected products
- Linux Linux kernel versions with RK3288 crypto driver (approximately 4.13+)
Timeline
- 2026-09-17: disclosed
- 2026-06-23: patched: Upstream commit ae150db7826f21e8d19e54fb6243169628809c4d