Predictable random values via linear congruential generator
Published Mar 27, 2024 · Updated Nov 4, 2025
Weak random generation in RT-Thread 5.0.2 and earlier allows remote attackers to predict output used in security contexts. The calc_random and calc_urandom functions update static seeds with the same linear congruential formula and expose only bits 16 through 30 as random data. Exploitation requires a security-sensitive consumer of the random or urandom device; predictable output can undermine cryptographic protections, with no reported integrity or availability impact.
Summary
What happened
Weak random generation in RT-Thread 5.0.2 and earlier allows remote attackers to predict output used in security contexts. The calc_random and calc_urandom functions update static seeds with the same linear congruential formula and expose only bits 16 through 30 as random data. Exploitation requires a security-sensitive consumer of the random or urandom device; predictable output can undermine cryptographic protections, with no reported integrity or availability impact.
The record
- CVE
- CVE-2024-25389
- Published
- Mar 27, 2024
- Updated
- Nov 4, 2025
- Vendor
- RT-Thread
- Product
- RT-Thread
- Classifications
- CWE-338
- Attack vector
- network
- Privileges
- unauthenticated
Timeline
How it unfolded
- Mar 27, 2024CVE publishedPublication date reported by the CVE source.
- Nov 4, 2025Record updatedLatest update available in the CVE record.
Exploitability
Present is not the same as exploitable
Compare your product and version with the public record. A matching version still requires validation against your environment.
Is a vulnerable build present?
Compare these published version ranges with your installed build and any vendor patches.
- Affected versionversion=0 <=5.0.2
What conditions does exploitation require?
What is affected?
Published CVSS scores
CVSS describes severity. EPSS estimates exploitation probability.
Attacks
What attackers are doing with it
Daily unique IPs observed by Shadowserver honeypots for known exploited vulnerabilities (KEVs). Missing observations do not establish an absence of attacks.
Weakness, pattern, technique
Public exploit references
No public exploit references are available in this record.
Labels summarize the accepted research assessment. They do not indicate a test against your environment.
Technologies
Your stack
See the directory against your own environment.
Your stack
Check the software in your environment
Book a demo to see how Hinoki identifies affected software and validates exploitability in your environment.
Book a demo