CVE-2023-53067: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: LoongArch: Only call get_timer_irq() once in constant_clockevent_init() Under CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_DEBUG_PREEMPT=y, we can see the following messages on LoongArch, this is because using might_sleep() in preemption disable context. [ 0.001127] smp: Bringing up secondary CPUs ... [ 0.001222] Booting CPU#1... [ 0.001244] 64-bit Loongson Processor probed (LA464 Core) [ 0.001247] CPU1 revision is: 0014c012 (Loongson-64bit) [ 0.001250] FPU1 revision is: 00000000 [ 0.001252] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 [ 0.001255] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1 [ 0.001257] preempt_count: 1, expected: 0 [ 0.001258] RCU nest depth: 0, expected: 0 [ 0.001259] Preemption disabled at: [ 0.001261] [<9000000000223800>] arch_dup_task_struct+0x20/0x110 [ 0.001272] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc7+ #43 [ 0.001275] Hardware name: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V4.0.05132-beta10 12/13/202 [ 0.001277] Stack : 0072617764726148 0000000000000000 9000000000222f1c 90000001001e0000 [ 0.001286] 90000001001e3be0 90000001001e3be8 0000000000000000 0000000000000000 [ 0.001292] 90000001001e3be8 0000000000000040 90000001001e3cb8 90000001001e3a50 [ 0.001297] 9000000001642000 90000001001e3be8 be694d10ce4139dd 9000000100174500 [ 0.001303] 0000000000000001 0000000000000001 00000000ffffe0a2 0000000000000020 [ 0.001309] 000000000000002f 9000000001354116 00000000056b0000 ffffffffffffffff [ 0.001314] 0000000000000000 0000000000000000 90000000014f6e90 9000000001642000 [ 0.001320] 900000000022b69c 0000000000000001 0000000000000000 9000000001736a90 [ 0.001325] 9000000100038000 0000000000000000 9000000000222f34 0000000000000000 [ 0.001331] 00000000000000b0 0000000000000004 0000000000000000 0000000000070000 [ 0.001337] ... [ 0.001339] Call Trace: [ 0.001342] [<9000000000222f34>] show_stack+0x5c/0x180 [ 0.001346] [<90000000010bdd80>] dump_stack_lvl+0x60/0x88 [ 0.001352] [<9000000000266418>] __might_resched+0x180/0x1cc [ 0.001356] [<90000000010c742c>] mutex_lock+0x20/0x64 [ 0.001359] [<90000000002a8ccc>] irq_find_matching_fwspec+0x48/0x124 [ 0.001364] [<90000000002259c4>] constant_clockevent_init+0x68/0x204 [ 0.001368] [<900000000022acf4>] start_secondary+0x40/0xa8 [ 0.001371] [<90000000010c0124>] smpboot_entry+0x60/0x64 Here are the complete call chains: smpboot_entry() start_secondary() constant_clockevent_init() get_timer_irq() irq_find_matching_fwnode() irq_find_matching_fwspec() mutex_lock() might_sleep() __might_sleep() __might_resched() In order to avoid the above issue, we should break the call chains, using timer_irq_installed variable as check condition to only call get_timer_irq() once in constant_clockevent_init() is a simple and proper way.
AI Analysis
Technical Summary
CVE-2023-53067 is a vulnerability identified in the Linux kernel specifically affecting the LoongArch architecture. The issue arises from the function constant_clockevent_init() calling get_timer_irq() multiple times without proper checks, leading to a problematic call chain that ultimately invokes might_sleep() within a preemption-disabled context. This is problematic because might_sleep() is intended to be called only in contexts where sleeping is allowed, and calling it in atomic or preemption-disabled contexts violates kernel execution rules, causing kernel BUGs and potential system instability. The detailed call chain involves smpboot_entry() initializing secondary CPUs, which calls start_secondary(), then constant_clockevent_init(), and subsequently get_timer_irq(), which leads to irq_find_matching_fwnode(), irq_find_matching_fwspec(), mutex_lock(), and finally might_sleep(). The root cause is that mutex_lock() internally calls might_sleep(), which is invalid in the current context. The fix involves introducing a check using a timer_irq_installed variable to ensure get_timer_irq() is called only once, thereby breaking the problematic call chain and preventing might_sleep() from being called in an invalid context. This vulnerability is specific to the LoongArch CPU architecture and the Linux kernel versions identified by the commit hashes provided. It manifests as kernel BUG messages during CPU initialization and can cause system crashes or instability during boot or runtime on affected systems.
Potential Impact
For European organizations, the impact of CVE-2023-53067 is primarily on systems running Linux kernels on LoongArch architecture processors. While LoongArch is a relatively niche architecture compared to x86 or ARM, it is gaining traction in certain markets, including China and potentially in specialized embedded or server environments. European organizations using LoongArch-based Linux systems, particularly in research, development, or specialized industrial applications, could experience system instability, kernel panics, or boot failures due to this vulnerability. This could lead to denial of service conditions, impacting availability of critical systems. Since the vulnerability occurs during CPU initialization and involves kernel locking mechanisms, it could also complicate debugging and recovery efforts. However, the vulnerability does not appear to allow privilege escalation or remote code execution directly, limiting its impact primarily to system stability and availability rather than confidentiality or integrity breaches. Given the limited market penetration of LoongArch in Europe, the overall impact is expected to be low to moderate but significant for affected niche deployments.
Mitigation Recommendations
To mitigate CVE-2023-53067, European organizations should: 1) Ensure that Linux kernel versions deployed on LoongArch systems include the patch that introduces the timer_irq_installed check to prevent multiple calls to get_timer_irq(). This may require updating to the latest stable kernel releases or applying vendor-provided patches. 2) Conduct thorough testing of kernel updates in controlled environments before deployment to detect any residual issues related to CPU initialization or locking. 3) Monitor system logs for kernel BUG messages or preemption-related errors during boot and runtime to detect potential exploitation or manifestation of this issue. 4) Limit the use of CONFIG_DEBUG_ATOMIC_SLEEP and CONFIG_DEBUG_PREEMPT kernel debug options in production environments unless necessary, as these options expose the problematic behavior more readily. 5) Collaborate with hardware vendors and Linux distribution maintainers to ensure timely patching and support for LoongArch-based systems. 6) For critical systems, consider fallback or redundancy strategies to maintain availability in case of kernel crashes caused by this vulnerability.
Affected Countries
Germany, France, United Kingdom, Netherlands, Italy
CVE-2023-53067: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: LoongArch: Only call get_timer_irq() once in constant_clockevent_init() Under CONFIG_DEBUG_ATOMIC_SLEEP=y and CONFIG_DEBUG_PREEMPT=y, we can see the following messages on LoongArch, this is because using might_sleep() in preemption disable context. [ 0.001127] smp: Bringing up secondary CPUs ... [ 0.001222] Booting CPU#1... [ 0.001244] 64-bit Loongson Processor probed (LA464 Core) [ 0.001247] CPU1 revision is: 0014c012 (Loongson-64bit) [ 0.001250] FPU1 revision is: 00000000 [ 0.001252] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:283 [ 0.001255] in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 0, name: swapper/1 [ 0.001257] preempt_count: 1, expected: 0 [ 0.001258] RCU nest depth: 0, expected: 0 [ 0.001259] Preemption disabled at: [ 0.001261] [<9000000000223800>] arch_dup_task_struct+0x20/0x110 [ 0.001272] CPU: 1 PID: 0 Comm: swapper/1 Not tainted 6.2.0-rc7+ #43 [ 0.001275] Hardware name: Loongson Loongson-3A5000-7A1000-1w-A2101/Loongson-LS3A5000-7A1000-1w-A2101, BIOS vUDK2018-LoongArch-V4.0.05132-beta10 12/13/202 [ 0.001277] Stack : 0072617764726148 0000000000000000 9000000000222f1c 90000001001e0000 [ 0.001286] 90000001001e3be0 90000001001e3be8 0000000000000000 0000000000000000 [ 0.001292] 90000001001e3be8 0000000000000040 90000001001e3cb8 90000001001e3a50 [ 0.001297] 9000000001642000 90000001001e3be8 be694d10ce4139dd 9000000100174500 [ 0.001303] 0000000000000001 0000000000000001 00000000ffffe0a2 0000000000000020 [ 0.001309] 000000000000002f 9000000001354116 00000000056b0000 ffffffffffffffff [ 0.001314] 0000000000000000 0000000000000000 90000000014f6e90 9000000001642000 [ 0.001320] 900000000022b69c 0000000000000001 0000000000000000 9000000001736a90 [ 0.001325] 9000000100038000 0000000000000000 9000000000222f34 0000000000000000 [ 0.001331] 00000000000000b0 0000000000000004 0000000000000000 0000000000070000 [ 0.001337] ... [ 0.001339] Call Trace: [ 0.001342] [<9000000000222f34>] show_stack+0x5c/0x180 [ 0.001346] [<90000000010bdd80>] dump_stack_lvl+0x60/0x88 [ 0.001352] [<9000000000266418>] __might_resched+0x180/0x1cc [ 0.001356] [<90000000010c742c>] mutex_lock+0x20/0x64 [ 0.001359] [<90000000002a8ccc>] irq_find_matching_fwspec+0x48/0x124 [ 0.001364] [<90000000002259c4>] constant_clockevent_init+0x68/0x204 [ 0.001368] [<900000000022acf4>] start_secondary+0x40/0xa8 [ 0.001371] [<90000000010c0124>] smpboot_entry+0x60/0x64 Here are the complete call chains: smpboot_entry() start_secondary() constant_clockevent_init() get_timer_irq() irq_find_matching_fwnode() irq_find_matching_fwspec() mutex_lock() might_sleep() __might_sleep() __might_resched() In order to avoid the above issue, we should break the call chains, using timer_irq_installed variable as check condition to only call get_timer_irq() once in constant_clockevent_init() is a simple and proper way.
AI-Powered Analysis
Technical Analysis
CVE-2023-53067 is a vulnerability identified in the Linux kernel specifically affecting the LoongArch architecture. The issue arises from the function constant_clockevent_init() calling get_timer_irq() multiple times without proper checks, leading to a problematic call chain that ultimately invokes might_sleep() within a preemption-disabled context. This is problematic because might_sleep() is intended to be called only in contexts where sleeping is allowed, and calling it in atomic or preemption-disabled contexts violates kernel execution rules, causing kernel BUGs and potential system instability. The detailed call chain involves smpboot_entry() initializing secondary CPUs, which calls start_secondary(), then constant_clockevent_init(), and subsequently get_timer_irq(), which leads to irq_find_matching_fwnode(), irq_find_matching_fwspec(), mutex_lock(), and finally might_sleep(). The root cause is that mutex_lock() internally calls might_sleep(), which is invalid in the current context. The fix involves introducing a check using a timer_irq_installed variable to ensure get_timer_irq() is called only once, thereby breaking the problematic call chain and preventing might_sleep() from being called in an invalid context. This vulnerability is specific to the LoongArch CPU architecture and the Linux kernel versions identified by the commit hashes provided. It manifests as kernel BUG messages during CPU initialization and can cause system crashes or instability during boot or runtime on affected systems.
Potential Impact
For European organizations, the impact of CVE-2023-53067 is primarily on systems running Linux kernels on LoongArch architecture processors. While LoongArch is a relatively niche architecture compared to x86 or ARM, it is gaining traction in certain markets, including China and potentially in specialized embedded or server environments. European organizations using LoongArch-based Linux systems, particularly in research, development, or specialized industrial applications, could experience system instability, kernel panics, or boot failures due to this vulnerability. This could lead to denial of service conditions, impacting availability of critical systems. Since the vulnerability occurs during CPU initialization and involves kernel locking mechanisms, it could also complicate debugging and recovery efforts. However, the vulnerability does not appear to allow privilege escalation or remote code execution directly, limiting its impact primarily to system stability and availability rather than confidentiality or integrity breaches. Given the limited market penetration of LoongArch in Europe, the overall impact is expected to be low to moderate but significant for affected niche deployments.
Mitigation Recommendations
To mitigate CVE-2023-53067, European organizations should: 1) Ensure that Linux kernel versions deployed on LoongArch systems include the patch that introduces the timer_irq_installed check to prevent multiple calls to get_timer_irq(). This may require updating to the latest stable kernel releases or applying vendor-provided patches. 2) Conduct thorough testing of kernel updates in controlled environments before deployment to detect any residual issues related to CPU initialization or locking. 3) Monitor system logs for kernel BUG messages or preemption-related errors during boot and runtime to detect potential exploitation or manifestation of this issue. 4) Limit the use of CONFIG_DEBUG_ATOMIC_SLEEP and CONFIG_DEBUG_PREEMPT kernel debug options in production environments unless necessary, as these options expose the problematic behavior more readily. 5) Collaborate with hardware vendors and Linux distribution maintainers to ensure timely patching and support for LoongArch-based systems. 6) For critical systems, consider fallback or redundancy strategies to maintain availability in case of kernel crashes caused by this vulnerability.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2025-05-02T15:51:43.548Z
- Cisa Enriched
- false
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d9819c4522896dcbd8486
Added to database: 5/21/2025, 9:08:41 AM
Last enriched: 7/5/2025, 6:24:32 AM
Last updated: 8/14/2025, 8:33:57 PM
Views: 13
Related Threats
CVE-2025-9099: Unrestricted Upload in Acrel Environmental Monitoring Cloud Platform
MediumCVE-2025-9098: Improper Export of Android Application Components in Elseplus File Recovery App
MediumCVE-2025-31715: CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection') in Unisoc (Shanghai) Technologies Co., Ltd. SL8521E/SL8521ET/ SL8541E/UIS8141E/UWS6137/UWS6137E/UWS6151(E)/UWS6152
CriticalCVE-2025-31714: CWE-20 Improper Input Validation in Unisoc (Shanghai) Technologies Co., Ltd. SL8521E/SL8521ET/ SL8541E/UIS8141E/UWS6137/UWS6137E/UWS6151(E)/UWS6152
MediumCVE-2025-31713: CWE-77 Improper Neutralization of Special Elements used in a Command ('Command Injection') in Unisoc (Shanghai) Technologies Co., Ltd. SL8521E/SL8521ET/ SL8541E/UIS8141E/UWS6137/UWS6137E/UWS6151(E)/UWS6152
HighActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.