CVE-2025-21767
clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running Linux >= d9b40ebd448e437ffbc65f013836f98252279a82, < d9c217fadfcff7a8df58567517d1e4253f3fd243; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 60f54f0d4ea530950549a8263e6fdd70a40490a4; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 852805b6cbdb69c298a8fc9fbe79994c95106e04; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 8783ceeee797d9aa9cfe150690fb9d0bac8cc459; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < cc3d79e7c806cb57d71c28a4a35e7d7fb3265faa; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 0fb534187d2355f6c8f995321e76d1ccd1262ac1; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 6bb05a33337b2c842373857b63de5c9bf1ae2a09; 193e14e68e907b2a7a936a7726accbaa4df25a4d; 155d3c5d24ee13cafa6236b49fc02b240a511d59; >= 5.10.50, < 5.10.235; …
- Anyone running Linux 5.14
Vulnerability facts
- Affected
- Linux >= d9b40ebd448e437ffbc65f013836f98252279a82, < d9c217fadfcff7a8df58567517d1e4253f3fd243; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 60f54f0d4ea530950549a8263e6fdd70a40490a4; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 852805b6cbdb69c298a8fc9fbe79994c95106e04; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 8783ceeee797d9aa9cfe150690fb9d0bac8cc459; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < cc3d79e7c806cb57d71c28a4a35e7d7fb3265faa; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 0fb534187d2355f6c8f995321e76d1ccd1262ac1; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 6bb05a33337b2c842373857b63de5c9bf1ae2a09; 193e14e68e907b2a7a936a7726accbaa4df25a4d; 155d3c5d24ee13cafa6236b49fc02b240a511d59; >= 5.10.50, < 5.10.235; …; Linux 5.14
- Fixed in
- Linux 60f54f0d4ea530950549a8263e6fdd70a40490a4, Linux 852805b6cbdb69c298a8fc9fbe79994c95106e04, Linux 8783ceeee797d9aa9cfe150690fb9d0bac8cc459, Linux 0fb534187d2355f6c8f995321e76d1ccd1262ac1, Linux 6bb05a33337b2c842373857b63de5c9bf1ae2a09, Linux 5.10.235
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Not remotely exploitable (local or adjacent access needed)
- CVSS
- 5.5 (v3.1, NVD)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Local
- Attack complexity: Low
- Privileges required: Low
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 0.23% chance of exploitation in 30 days (percentile 8, 2026-11-26)
- CWE
- CWE-667
- Modified
Description
In the Linux kernel, the following vulnerability has been resolved: clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context The following bug report happened with a PREEMPT_RT kernel: BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 2012, name: kwatchdog preempt_count: 1, expected: 0 RCU nest depth: 0, expected: 0 get_random_u32+0x4f/0x110 clocksource_verify_choose_cpus+0xab/0x1a0 clocksource_verify_percpu.part.0+0x6b/0x330 clocksource_watchdog_kthread+0x193/0x1a0 It is due to the fact that clocksource_verify_choose_cpus() is invoked with preemption disabled. This function invokes get_random_u32() to obtain random numbers for choosing CPUs. The batched_entropy_32 local lock and/or the base_crng.lock spinlock in driver/char/random.c will be acquired during the call. In PREEMPT_RT kernel, they are both sleeping locks and so cannot be acquired in atomic context. Fix this problem by using migrate_disable() to allow smp_processor_id() to be reliably used without introducing atomic context. preempt_disable() is then called after clocksource_verify_choose_cpus() but before the clocksource measurement is being run to avoid introducing unexpected latency.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Linux | >= d9b40ebd448e437ffbc65f013836f98252279a82, < d9c217fadfcff7a8df58567517d1e4253f3fd243; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 60f54f0d4ea530950549a8263e6fdd70a40490a4; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 852805b6cbdb69c298a8fc9fbe79994c95106e04; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 8783ceeee797d9aa9cfe150690fb9d0bac8cc459; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < cc3d79e7c806cb57d71c28a4a35e7d7fb3265faa; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 0fb534187d2355f6c8f995321e76d1ccd1262ac1; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 6bb05a33337b2c842373857b63de5c9bf1ae2a09; 193e14e68e907b2a7a936a7726accbaa4df25a4d; 155d3c5d24ee13cafa6236b49fc02b240a511d59; >= 5.10.50, < 5.10.235; … | — | cvelist |
| Linux | 5.14 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2025-21767. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2025-21767.md Affected: Linux >= d9b40ebd448e437ffbc65f013836f98252279a82, < d9c217fadfcff7a8df58567517d1e4253f3fd243; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 60f54f0d4ea530950549a8263e6fdd70a40490a4; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 852805b6cbdb69c298a8fc9fbe79994c95106e04; >= 7560c02bdffb7c52d1457fa… Fixed in: Linux 60f54f0d4ea530950549a8263e6fdd70a40490a4, Linux 852805b6cbdb69c298a8fc9fbe79994c95106e04, Linux 8783ceeee797d9aa9cfe150690fb9d0bac8cc459, Linux 0fb534187d2355f6c8f995321e76d1ccd1262ac1, Linux 6bb05a33337b2c842373857b63de5c9bf1ae2a09, Linux 5.10.235 Steps: 1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Patches
- https://git.kernel.org/stable/c/d9c217fadfcff7a8df58567517d1e4253f3fd243
- https://git.kernel.org/stable/c/60f54f0d4ea530950549a8263e6fdd70a40490a4
- https://git.kernel.org/stable/c/852805b6cbdb69c298a8fc9fbe79994c95106e04
- https://git.kernel.org/stable/c/8783ceeee797d9aa9cfe150690fb9d0bac8cc459
- https://git.kernel.org/stable/c/cc3d79e7c806cb57d71c28a4a35e7d7fb3265faa
- https://git.kernel.org/stable/c/0fb534187d2355f6c8f995321e76d1ccd1262ac1
- https://git.kernel.org/stable/c/6bb05a33337b2c842373857b63de5c9bf1ae2a09
FAQ
Is CVE-2025-21767 being exploited?
There is no confirmed exploitation: CVE-2025-21767 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.23% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2025-21767?
Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).
Which versions are affected by CVE-2025-21767?
Linux >= d9b40ebd448e437ffbc65f013836f98252279a82, < d9c217fadfcff7a8df58567517d1e4253f3fd243; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 60f54f0d4ea530950549a8263e6fdd70a40490a4; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 852805b6cbdb69c298a8fc9fbe79994c95106e04; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 8783ceeee797d9aa9cfe150690fb9d0bac8cc459; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < cc3d79e7c806cb57d71c28a4a35e7d7fb3265faa; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 0fb534187d2355f6c8f995321e76d1ccd1262ac1; >= 7560c02bdffb7c52d1457fa551b9e745d4b9e754, < 6bb05a33337b2c842373857b63de5c9bf1ae2a09; 193e14e68e907b2a7a936a7726accbaa4df25a4d; 155d3c5d24ee13cafa6236b49fc02b240a511d59; >= 5.10.50, < 5.10.235; …; Linux 5.14.
Is there a fix for CVE-2025-21767?
Yes. Fixed in Linux 60f54f0d4ea530950549a8263e6fdd70a40490a4, Linux 852805b6cbdb69c298a8fc9fbe79994c95106e04, Linux 8783ceeee797d9aa9cfe150690fb9d0bac8cc459, Linux 0fb534187d2355f6c8f995321e76d1ccd1262ac1, Linux 6bb05a33337b2c842373857b63de5c9bf1ae2a09, Linux 5.10.235. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2025-21767?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.