hwrng: xilinx-trng - propagate timeout before any data is read
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.527.2.67.3In the Linux kernel, the following vulnerability has been resolved:
hwrng: xilinx-trng - propagate timeout before any data is read
xtrng_readblock32() polls for 16-byte chunks but returns the number of bytes read even when the first poll times out. Its caller then treats a zero return as a short successful read, and partial reads for full 32-byte blocks can make the tail copy use a fixed block offset rather than the amount already produced.
Return the poll error when no data has been read, preserve partial positive returns after some data is available, stop the generator on all collection exits, and append tail bytes at the current output count.
From the CVE record · Linux
The Linux kernel’s xilinx-trng hardware random-number generator mishandles a timeout before any data is read, treating it as a successful zero-byte read. Partial reads can also cause tail bytes to be copied at the wrong offset. These issues occur during random-data collection; the input does not specify an attacker access requirement or user interaction.
Teams running Linux kernels with the xilinx-trng driver should check their affected versions against the vendor advisory.