Executive brief
The Linux kernel's Atmel SHA204A cryptographic hardware driver improperly managed random number generation buffers, causing it to return mostly zeros instead of valid random data. This degradation of entropy quality undermines cryptographic operations that depend on the hardware random number generator, potentially weakening the security of systems using this component for key generation or other entropy-dependent functions.
Technical details
The vulnerability is a buffer management bug in the `atmel-sha204a.c` driver's random number generation functions. Both blocking (`atmel_sha204a_rng_read`) and non-blocking (`atmel_sha204a_rng_read_nonblocking`) code paths were reading from the wrong buffer offset and using an incorrect size calculation, causing most output bytes to be zeros. The fix corrects the `memcpy` operations to start at `RSP_DATA_IDX` (byte offset 1) and use the proper size constant `RANDOM_RSP_SIZE - CMD_OVERHEAD_SIZE` (32 bytes) instead of the full buffer size. The vulnerability affects systems relying on the Atmel SHA204A hardware for random number generation; no privilege escalation or remote exploitation is possible, but entropy degradation reduces cryptographic security. The fix has been merged upstream and backported to stable kernel branches.
Affected products
- Linux Linux kernel multiple versions with atmel-sha204a driver (fixed in commit 319400fc5ee15db5793aa45f854968141326effc and backported)
Timeline
- 2026-08-15: disclosed
- 2026-05-07: patched: upstream commit 319400fc5ee15db5793aa45f854968141326effc