clocksource: Use migrate_disable() to avoid calling get_random_u32() in atomic context
Key facts
- Attack vector
- Local
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Partial Red Hat: 3 without a fix
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and Red Hat. Impact type from CWE-667 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| Linux | Linux | 5.10.50 to before 5.10.235; 5.12.17 to before 5.13; 5.13.2 to before 5.14 | 5.10.235, 5.13, 5.14 | Patch available | CNA |
| Linux | Linux | 5.14 and later | 5.10.235, 5.15.179, 6.1.129, 6.6.79, 6.12.16, 6.13.4, 6.14 | Patch available | CNA |
- Linux VendorLinux Affected 5.10.50 to before 5.10.235; 5.12.17 to before 5.13; 5.13.2 to before 5.14 Fixed in 5.10.235, 5.13, 5.14 Patch available CNA
- Linux VendorLinux Affected 5.14 and later Fixed in 5.10.235, 5.15.179, 6.1.129, 6.6.79, 6.12.16, 6.13.4, 6.14 Patch available CNA
CPE configurations NVD · 2
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.10.50 to before 5.10.235; 5.12.17 to before 5.13; 5.13.2 to before 5.15.179; 5.16 to before 6.1.129; 6.2 to before 6.6.79; 6.7 to before 6.12.16; 6.13 to before 6.13.4 | Vulnerable | Linux |
| cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:* | 6.14 rc1 | Vulnerable | Linux |
- cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* Versions 5.10.50 to before 5.10.235; 5.12.17 to before 5.13; 5.13.2 to before 5.15.179; 5.16 to before 6.1.129; 6.2 to before 6.6.79; 6.7 to before 6.12.16; 6.13 to before 6.13.4 Vulnerable ·Linux
- cpe:2.3:o:linux:linux_kernel:6.14:rc1:*:*:*:*:*:* Versions 6.14 rc1 Vulnerable ·Linux
Remediation
- Fix · CNA Linux (Linux) Fixed in 5.10.235, 5.13, 5.14
- Fix · CNA Linux (Linux) Fixed in 5.10.235, 5.15.179, 6.1.129, 6.6.79, 6.12.16, 6.13.4, 6.14
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 6 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
| Red Hat Enterprise Linux 9 | Affected | No fix yet |
Not affected: 2 products
- Red Hat Enterprise Linux 10
- Red Hat Enterprise Linux 8
Timeline
- 2026-10-02 Threatist record created from CVE-2025-21767
- 2026-10-03 Alias added: GHSA-h97w-34cr-4pxx
- 2026-11-05 CISA SSVC decision points changed
References
Patch 7
- 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
More Linux Kernel vulnerabilities
- TI-2025-26358 tls: fix handling of zero-length records on the rx_list KEVCVSS 3.1CRITICAL 9.8
- TI-2026-38352 netfilter: bridge: make ebt_snat ARP rewrite writable KEVCVSS 3.1HIGH 8.8
- TI-2013-05264 The (1) get_user and (2) put_user API functions in the Linux kernel before 3.5.5 on the… KEVCVSS 3.1HIGH 8.8
- TI-2022-00125 Integer overflow in kernel KEVCVSS 3.1HIGH 8.4
- TI-2013-01864 The perf_swevent_init function in kernel/events/core.c in the Linux kernel before 3.8.9… KEVCVSS 3.1HIGH 8.4
- TI-2021-05514 Heap Out-Of-Bounds Write in Netfilter IP6T_SO_SET_REPLACE KEVCVSS 3.1HIGH 8.3
Sources
- CVE-2025-21767 · CVE Program
- CVE-2025-21767 · NVD
- FIRST EPSS
- GHSA-h97w-34cr-4pxx · GitHub Advisory Database · CC BY 4.0
- CVE-2025-21767 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences