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

Not scored Published Updated

A division by zero error in the ks-sa hardware random number generator driver can cause a kernel crash, leading to denial of service.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-40127?

CVE-2025-40127 is a denial of service vulnerability in Linux, published on 12 Nov 2025. It can only be exploited from the same machine or local network, with no action from the victim.

Official 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(+)

Which versions are affected by CVE-2025-40127?

How do I fix CVE-2025-40127?

Apply the vendor's patch.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2025-40127 being exploited?

There is no known exploitation of CVE-2025-40127 in the wild and no public exploit code.

Sources

Also known as BELL-CVE-2025-40127, DEBIAN-CVE-2025-40127, GHSA-666w-62rj-5fc6, ROOT-OS-DEBIAN-11-CVE-2025-40127, ROOT-OS-DEBIAN-13-CVE-2025-40127, ROOT-OS-UBUNTU-2404-CVE-2025-40127 and 1 more.

Is CVE-2025-40127 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free