CVE-2025-40127

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-40127
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40127.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40127
Downstream
Published
2025-11-12T10:23:20.775Z
Modified
2025-11-28T02:35:19.238771Z
Summary
hwrng: ks-sa - fix division by zero in ks_sa_rng_init
Details

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

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

Fix division by zero in kssarnginit caused by missing clock pointer initialization. The clkget_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(+)

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40127.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6d01d8511dceb9cd40f72eb102b7d24f0b2e997b
Fixed
692a04a1e0cde1d80a33df0078c755cf02cd7268
Fixed
d76b099011fa056950f63d05ebb6160991242f6a
Fixed
eec7e0e19c1fa75dc65e25aa6a21ef24a03849af
Fixed
f4238064379a91e71a9c258996acac43c50c2094
Fixed
2b6bcce32cb5aff84588a844a4d3f6dd5353b8e2
Fixed
55a70e1de75e5ff5f961c79a2cdc6a4468cc2bf2
Fixed
612b1dfeb414dfa780a6316014ceddf9a74ff5c0

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40127.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.246
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.195
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.156
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.112
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.53
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.3

Database specific

source

"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40127.json"