Skip to main content

CVE-2025-21912: Vulnerability in Linux Linux

Medium
VulnerabilityCVE-2025-21912cvecve-2025-21912
Published: Tue Apr 01 2025 (04/01/2025, 15:40:50 UTC)
Source: CVE
Vendor/Project: Linux
Product: Linux

Description

In the Linux kernel, the following vulnerability has been resolved: gpio: rcar: Use raw_spinlock to protect register access Use raw_spinlock in order to fix spurious messages about invalid context when spinlock debugging is enabled. The lock is only used to serialize register access. [ 4.239592] ============================= [ 4.239595] [ BUG: Invalid wait context ] [ 4.239599] 6.13.0-rc7-arm64-renesas-05496-gd088502a519f #35 Not tainted [ 4.239603] ----------------------------- [ 4.239606] kworker/u8:5/76 is trying to lock: [ 4.239609] ffff0000091898a0 (&p->lock){....}-{3:3}, at: gpio_rcar_config_interrupt_input_mode+0x34/0x164 [ 4.239641] other info that might help us debug this: [ 4.239643] context-{5:5} [ 4.239646] 5 locks held by kworker/u8:5/76: [ 4.239651] #0: ffff0000080fb148 ((wq_completion)async){+.+.}-{0:0}, at: process_one_work+0x190/0x62c [ 4.250180] OF: /soc/sound@ec500000/ports/port@0/endpoint: Read of boolean property 'frame-master' with a value. [ 4.254094] #1: ffff80008299bd80 ((work_completion)(&entry->work)){+.+.}-{0:0}, at: process_one_work+0x1b8/0x62c [ 4.254109] #2: ffff00000920c8f8 [ 4.258345] OF: /soc/sound@ec500000/ports/port@1/endpoint: Read of boolean property 'bitclock-master' with a value. [ 4.264803] (&dev->mutex){....}-{4:4}, at: __device_attach_async_helper+0x3c/0xdc [ 4.264820] #3: ffff00000a50ca40 (request_class#2){+.+.}-{4:4}, at: __setup_irq+0xa0/0x690 [ 4.264840] #4: [ 4.268872] OF: /soc/sound@ec500000/ports/port@1/endpoint: Read of boolean property 'frame-master' with a value. [ 4.273275] ffff00000a50c8c8 (lock_class){....}-{2:2}, at: __setup_irq+0xc4/0x690 [ 4.296130] renesas_sdhi_internal_dmac ee100000.mmc: mmc1 base at 0x00000000ee100000, max clock rate 200 MHz [ 4.304082] stack backtrace: [ 4.304086] CPU: 1 UID: 0 PID: 76 Comm: kworker/u8:5 Not tainted 6.13.0-rc7-arm64-renesas-05496-gd088502a519f #35 [ 4.304092] Hardware name: Renesas Salvator-X 2nd version board based on r8a77965 (DT) [ 4.304097] Workqueue: async async_run_entry_fn [ 4.304106] Call trace: [ 4.304110] show_stack+0x14/0x20 (C) [ 4.304122] dump_stack_lvl+0x6c/0x90 [ 4.304131] dump_stack+0x14/0x1c [ 4.304138] __lock_acquire+0xdfc/0x1584 [ 4.426274] lock_acquire+0x1c4/0x33c [ 4.429942] _raw_spin_lock_irqsave+0x5c/0x80 [ 4.434307] gpio_rcar_config_interrupt_input_mode+0x34/0x164 [ 4.440061] gpio_rcar_irq_set_type+0xd4/0xd8 [ 4.444422] __irq_set_trigger+0x5c/0x178 [ 4.448435] __setup_irq+0x2e4/0x690 [ 4.452012] request_threaded_irq+0xc4/0x190 [ 4.456285] devm_request_threaded_irq+0x7c/0xf4 [ 4.459398] ata1: link resume succeeded after 1 retries [ 4.460902] mmc_gpiod_request_cd_irq+0x68/0xe0 [ 4.470660] mmc_start_host+0x50/0xac [ 4.474327] mmc_add_host+0x80/0xe4 [ 4.477817] tmio_mmc_host_probe+0x2b0/0x440 [ 4.482094] renesas_sdhi_probe+0x488/0x6f4 [ 4.486281] renesas_sdhi_internal_dmac_probe+0x60/0x78 [ 4.491509] platform_probe+0x64/0xd8 [ 4.495178] really_probe+0xb8/0x2a8 [ 4.498756] __driver_probe_device+0x74/0x118 [ 4.503116] driver_probe_device+0x3c/0x154 [ 4.507303] __device_attach_driver+0xd4/0x160 [ 4.511750] bus_for_each_drv+0x84/0xe0 [ 4.515588] __device_attach_async_helper+0xb0/0xdc [ 4.520470] async_run_entry_fn+0x30/0xd8 [ 4.524481] process_one_work+0x210/0x62c [ 4.528494] worker_thread+0x1ac/0x340 [ 4.532245] kthread+0x10c/0x110 [ 4.535476] ret_from_fork+0x10/0x20

AI-Powered Analysis

AILast updated: 06/30/2025, 10:40:47 UTC

Technical Analysis

CVE-2025-21912 is a vulnerability identified in the Linux kernel, specifically related to the gpio subsystem for Renesas R-Car platforms. The issue stems from improper locking mechanisms protecting register access within the gpio_rcar driver. The vulnerability is due to the use of an inadequate spinlock type, which leads to spurious invalid wait context errors when spinlock debugging is enabled. The fix involves replacing the existing spinlock with a raw_spinlock to properly serialize register access and prevent these erroneous lock context warnings. The vulnerability manifests as kernel log messages indicating invalid wait contexts and potential deadlocks or race conditions during interrupt configuration and device probing on affected hardware. The detailed kernel stack traces show that the problem occurs during gpio interrupt input mode configuration and IRQ setup, particularly on Renesas Salvator-X boards based on the r8a77965 SoC. While the vulnerability does not appear to allow direct privilege escalation or arbitrary code execution, it can cause kernel instability, unexpected behavior, or denial of service due to improper synchronization in low-level hardware access. The issue affects specific Linux kernel versions prior to the patch and is relevant for embedded or specialized Linux systems running on Renesas R-Car platforms. No known exploits are reported in the wild, and no CVSS score has been assigned yet.

Potential Impact

For European organizations, the impact of CVE-2025-21912 depends largely on the deployment of Linux systems using affected Renesas R-Car hardware, which is common in automotive, industrial control, and embedded device markets. Organizations relying on embedded Linux in critical infrastructure, manufacturing automation, or automotive telematics could face system instability or denial of service if the vulnerability is triggered. This could lead to operational disruptions, safety risks in automotive or industrial environments, and increased maintenance costs. Although the vulnerability does not directly compromise confidentiality or integrity, the potential for kernel crashes or deadlocks could interrupt services and impact availability. European companies in sectors such as automotive manufacturing, industrial automation, and IoT device production that utilize Renesas R-Car based Linux systems are most at risk. The vulnerability may also affect vendors providing embedded Linux solutions or custom hardware platforms within Europe, potentially impacting supply chains and service continuity.

Mitigation Recommendations

To mitigate CVE-2025-21912, European organizations should: 1) Identify all Linux systems running on Renesas R-Car platforms, especially those using kernel versions prior to the patch. 2) Apply the official Linux kernel patch that replaces the spinlock with a raw_spinlock in the gpio_rcar driver as soon as it becomes available. 3) For embedded devices where kernel updates are challenging, consider recompiling the kernel with the fix or deploying updated firmware from device vendors. 4) Implement monitoring for kernel logs to detect invalid wait context messages or related kernel warnings that may indicate attempts to trigger the vulnerability. 5) Conduct thorough testing of updated kernels in controlled environments to ensure stability before wide deployment. 6) Collaborate with hardware and software vendors to ensure timely patch distribution and support for affected platforms. 7) For critical systems, consider additional redundancy or failover mechanisms to maintain availability in case of kernel instability. These steps go beyond generic advice by focusing on the specific hardware and kernel subsystem involved and emphasizing proactive detection and vendor coordination.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
Linux
Date Reserved
2024-12-29T08:45:45.787Z
Cisa Enriched
false
Cvss Version
null
State
PUBLISHED

Threat ID: 682d9833c4522896dcbe8b9a

Added to database: 5/21/2025, 9:09:07 AM

Last enriched: 6/30/2025, 10:40:47 AM

Last updated: 8/16/2025, 10:31:08 PM

Views: 19

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats