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 074E71B040B for ; Thu, 29 May 2025 13:16:10 +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=1748524571; cv=none; b=NfP7YkISir4KvCp3P+a4tcQH/vJpUcj7Ng61Cyntbj3NjGN250lKvqqF+1lvPpKgU/SjwA1NcJ2iqD2lsPwWpbrsGD5cinay4gOK4Yq56kuW95JGaXsYBbttd34Bs2QeX0qjNc4sHx0Lr9MsHig4rZkdQJcmItprMH5WnZEQmZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748524571; c=relaxed/simple; bh=XMfWR0ZPMXXIV2kbwbjjU8KiXNY9oP6aJnpJHmSQ+uQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=C3tEXptVxwr/LHr9Vf8HWX7MlsHxMGmxvefq5LMYVqOxIcNMhew9q7OFslP3b8lEeiDN6DHm0TpyYKNg00ec2hGAHCtH3qifcrJ16Tzv85zyXOIxBHZa8Sqdq4S0NwYtiX/oPDiVM67TTvycnOoyOm4EelEdSNj9jQVYFyYtKuU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Cpw0RAin; 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="Cpw0RAin" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16996C4CEE7; Thu, 29 May 2025 13:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1748524570; bh=XMfWR0ZPMXXIV2kbwbjjU8KiXNY9oP6aJnpJHmSQ+uQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=Cpw0RAinBe58H7FeK49Iv8kf3c7DuYRyhMUM4lwQadezMOpMI2WIhFtCkbMZivEgL aXKVxyY9eXNIvoBlxnly9cOaj4qgW8IprWWQHttRIQQz//PcAVnEmEJc/VPPRlDY9L JcVohAm7F+MgIFk/dgP6kkfBKrAzevrRt6/xD0YM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37993: can: m_can: m_can_class_allocate_dev(): initialize spin lock on device probe Date: Thu, 29 May 2025 15:16:00 +0200 Message-ID: <2025052959-CVE-2025-37993-5c67@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=3537; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Bu48sRz63nmnXcNMS+F55qYgoSCe344fwcKBTAjhrog=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkWcfwBV47tSNBr/nVL4/OeIx/nxDusan5sLGrycUvoX b59/fnTOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiMmcZFpyUa6zaLDQpsCtZ c5ttbtL2C39DHzIsOD/dPvBUw4rdSo/e5ckIT3d8p+JrCwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: can: m_can: m_can_class_allocate_dev(): initialize spin lock on device probe The spin lock tx_handling_spinlock in struct m_can_classdev is not being initialized. This leads the following spinlock bad magic complaint from the kernel, eg. when trying to send CAN frames with cansend from can-utils: | BUG: spinlock bad magic on CPU#0, cansend/95 | lock: 0xff60000002ec1010, .magic: 00000000, .owner: /-1, .owner_cpu: 0 | CPU: 0 UID: 0 PID: 95 Comm: cansend Not tainted 6.15.0-rc3-00032-ga79be02bba5c #5 NONE | Hardware name: MachineWare SIM-V (DT) | Call Trace: | [] dump_backtrace+0x1c/0x24 | [] show_stack+0x28/0x34 | [] dump_stack_lvl+0x4a/0x68 | [] dump_stack+0x14/0x1c | [] spin_dump+0x62/0x6e | [] do_raw_spin_lock+0xd0/0x142 | [] _raw_spin_lock_irqsave+0x20/0x2c | [] m_can_start_xmit+0x90/0x34a | [] dev_hard_start_xmit+0xa6/0xee | [] sch_direct_xmit+0x114/0x292 | [] __dev_queue_xmit+0x3b0/0xaa8 | [] can_send+0xc6/0x242 | [] raw_sendmsg+0x1a8/0x36c | [] sock_write_iter+0x9a/0xee | [] vfs_write+0x184/0x3a6 | [] ksys_write+0xa0/0xc0 | [] __riscv_sys_write+0x14/0x1c | [] do_trap_ecall_u+0x168/0x212 | [] handle_exception+0x146/0x152 Initializing the spin lock in m_can_class_allocate_dev solves that problem. The Linux kernel CVE team has assigned CVE-2025-37993 to this issue. Affected and fixed versions =========================== Issue introduced in 6.9 with commit 1fa80e23c15051edc1c594270517de3517ded798 and fixed in 6.12.29 with commit 2ecce25ea296f328d79070ee36229a15aeeb7aca Issue introduced in 6.9 with commit 1fa80e23c15051edc1c594270517de3517ded798 and fixed in 6.14.7 with commit 7d5379cfecfdd665e4206bc4f19824656388779f Issue introduced in 6.9 with commit 1fa80e23c15051edc1c594270517de3517ded798 and fixed in 6.15 with commit dcaeeb8ae84c5506ebc574732838264f3887738c 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-37993 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/net/can/m_can/m_can.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/2ecce25ea296f328d79070ee36229a15aeeb7aca https://git.kernel.org/stable/c/7d5379cfecfdd665e4206bc4f19824656388779f https://git.kernel.org/stable/c/dcaeeb8ae84c5506ebc574732838264f3887738c