# CVE-2025-40127: hwrng: ks-sa - fix division by zero in ks_sa_rng_init

- Severity: not scored yet
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 13% of CVEs (2026-12-01)
- Published: 2025-11-12T10:23:20.775Z
- Modified: 2026-10-19T21:10:00.160Z
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

hwrng: ks-sa - fix division by zero in ks_sa_rng_init

Fix division by zero in ks_sa_rng_init caused by missing clock
pointer initialization. The clk_get_rate() call is performed on
an uninitialized clk pointer, resulting in division by zero when
calculating delay values.

Add clock initialization code before using the clock.


 drivers/char/hw_random/ks-sa-rng.c | 7 +++++++
 1 file changed, 7 insertions(+)

(As written by CVE List.)

## Affected

- Linux Linux: from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before 692a04a1e0cde1d80a33df0078c755cf02cd7268; from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before d76b099011fa056950f63d05ebb6160991242f6a; from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before eec7e0e19c1fa75dc65e25aa6a21ef24a03849af; from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before f4238064379a91e71a9c258996acac43c50c2094; from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before 2b6bcce32cb5aff84588a844a4d3f6dd5353b8e2; from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before 55a70e1de75e5ff5f961c79a2cdc6a4468cc2bf2; from 6d01d8511dceb9cd40f72eb102b7d24f0b2e997b before 612b1dfeb414dfa780a6316014ceddf9a74ff5c0; 5.5 (not affected: before 5.5; from 5.10.246 up to 5.10.*; from 5.15.195 up to 5.15.*; from 6.1.156 up to 6.1.*; from 6.6.112 up to 6.6.*; from 6.12.53 up to 6.12.*; from 6.17.3 up to 6.17.*; from 6.18 up to *)

## References

- <https://git.kernel.org/stable/c/692a04a1e0cde1d80a33df0078c755cf02cd7268>
- <https://git.kernel.org/stable/c/d76b099011fa056950f63d05ebb6160991242f6a>
- <https://git.kernel.org/stable/c/eec7e0e19c1fa75dc65e25aa6a21ef24a03849af>
- <https://git.kernel.org/stable/c/f4238064379a91e71a9c258996acac43c50c2094>
- <https://git.kernel.org/stable/c/2b6bcce32cb5aff84588a844a4d3f6dd5353b8e2>
- <https://git.kernel.org/stable/c/55a70e1de75e5ff5f961c79a2cdc6a4468cc2bf2>
- <https://git.kernel.org/stable/c/612b1dfeb414dfa780a6316014ceddf9a74ff5c0>

## Sources

- CVE List: [CVE-2025-40127](https://www.cve.org/CVERecord?id=CVE-2025-40127), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-40127](https://nvd.nist.gov/vuln/detail/CVE-2025-40127), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-40127 · Whole record: https://cve.day/CVE-2025-40127.json · Rebuilt by cve.day 2026-11-25T22:59:07.546Z
