CVE-2026-93157: hwrng: xilinx-trng - propagate timeout before any data is read
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In 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.
The Linux kernel CVE team has assigned CVE-2026-93157 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.18 with commit 8979744aca8096ee5072798dfc1181606919b35d and fixed in 6.18.52 with commit 62219775a07ce0bd8085852f3d1e2d772bf6fdec Issue introduced in 6.18 with commit 8979744aca8096ee5072798dfc1181606919b35d and fixed in 7.2.6 with commit bdc3b37a935f28c3e9eb2f6e889b4644d859fb08 Issue introduced in 6.18 with commit 8979744aca8096ee5072798dfc1181606919b35d and fixed in 7.3-rc1 with commit ba088974419326daf46c5dc03e2cf6ab6ab701f7
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-93157
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/char/hw_random/xilinx-trng.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/62219775a07ce0bd8085852f3d1e2d772bf6fdec https://git.kernel.org/stable/c/bdc3b37a935f28c3e9eb2f6e889b4644d859fb08 https://git.kernel.org/stable/c/ba088974419326daf46c5dc03e2cf6ab6ab701f7