Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 618AF1D86E6 for ; Tue, 1 Apr 2025 15:41:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522073; cv=none; b=Ltb+YGho6DRE71izryHlJ3nSTqEeLXDB+s8B5u9cYUwgFITeOWpDTvbwxjzcKj2cNCvyk57ua8+tKKD2ISzdwgQQkSS2M4PaNLUWJw7RdJZSghb1TVvUvH8vkGJmDxxyRQRmLa7xJV3KhQRrkBy4zQAzbD4AXzfkbij0xkMOHdE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1743522073; c=relaxed/simple; bh=ZsMhhy40mWJ5mNAaK2NNuxELc9ERorTg9Ye72dxLWRE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=RIX9kMQvYsiRIg6d5kMHm30aw9EA4Llxb9ab0NkuGvR0S9iUUjZVkL7DcojA9RdAs+S2p3mvjCsZRjh5IHxALvnBiWwBquej4c6gdv+CEPzoILEr3RluyeRrIoXR2zJF5Km2TJvfv2pRvfEeTq6ZxC8+7cFEblrJ7HYaO23PT/k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KES7MyHo; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="KES7MyHo" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7F3DEC4CEE4; Tue, 1 Apr 2025 15:41:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1743522072; bh=ZsMhhy40mWJ5mNAaK2NNuxELc9ERorTg9Ye72dxLWRE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KES7MyHoTROhfUK7D0u1yS/EpLthmSdl+rAK04xuHHDIFWkqTQGofbgTs/3o+lvoO WI4lDTHxtAjHlI1s2I1LqDiyGC60KFMc/JGhbY0PBigpnXv5SupDuvw4+D9lnoJodB OCfe5hlSqI0xor15IuhkZIC/v/EZQ7p5ACPU7rwM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21912: gpio: rcar: Use raw_spinlock to protect register access Date: Tue, 1 Apr 2025 16:39:36 +0100 Message-ID: <2025040130-CVE-2025-21912-5b97@gregkh> X-Mailer: git-send-email 2.49.0 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=5890; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ZsMhhy40mWJ5mNAaK2NNuxELc9ERorTg9Ye72dxLWRE=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlvODblrPD4bMrybN8W6Y3+vx3ZJp3MO3OjQU8nM7cwV eDp9X+7O2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAi9uYM84M/p/w2F9AWcVS0 MQ3Y5FbysdNdl2Ge2YFjG04ZLbC5+mX+7Tm5POqHnNb4AQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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 The Linux kernel CVE team has assigned CVE-2025-21912 to this issue. Affected and fixed versions =========================== Fixed in 5.15.179 with commit 7c1f36f9c9aca507d317479a3d3388150ae40a87 Fixed in 6.1.131 with commit 3e300913c42041e81c5b17a970c4e078086ff2d1 Fixed in 6.6.83 with commit c10365031f16514a29c812cd909085a6e4ea4b61 Fixed in 6.12.19 with commit b42c84f9e4ec5bc2885e7fd80c79ec0352f5d2af Fixed in 6.13.7 with commit 51ef3073493e2a25dced05fdd59dfb059e7e284d Fixed in 6.14 with commit f02c41f87cfe61440c18bf77d1ef0a884b9ee2b5 Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2025-21912 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/gpio/gpio-rcar.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/7c1f36f9c9aca507d317479a3d3388150ae40a87 https://git.kernel.org/stable/c/3e300913c42041e81c5b17a970c4e078086ff2d1 https://git.kernel.org/stable/c/c10365031f16514a29c812cd909085a6e4ea4b61 https://git.kernel.org/stable/c/b42c84f9e4ec5bc2885e7fd80c79ec0352f5d2af https://git.kernel.org/stable/c/51ef3073493e2a25dced05fdd59dfb059e7e284d https://git.kernel.org/stable/c/f02c41f87cfe61440c18bf77d1ef0a884b9ee2b5