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 C4ACE26C3B3 for ; Fri, 9 May 2025 06:43:34 +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=1746773014; cv=none; b=AH7Mau+r/6z3kJt8Sp53acbP8WjFLi4XkzUCZyEDCXRZq5KvvuFVQOHYo+EvyzTTgfPwRl4B+Em2+Dn6oqAWS2WGU8w2GEW5be2T1DYP5tpF4BpGmuS/EEZb3ikgtQhGcFTq2xsRgmTc9XIH/6U5/C+7DA6sqOB1Ur9oIutnGUE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746773014; c=relaxed/simple; bh=gdVVhqdD3Ya1ITljtKt8ojGq04WcBEf5eLCT4Ics7Gg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=CGjLShMyeP24TaH9FwRuVFSYXy8ApTt2oX9LtoBm5ovxarmiZ++76TnqK3D3ch3zHnhRzCJ6p31Dq48+e9OxBtzXHjvWPCcMes0112CryzLgHwA4pUdO4YX4oQRMEFpzPbllBJzZ1CRWIwYC+kwPpv+uzyUOWk4MiZXYai2UvIM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cua+RgjS; 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="cua+RgjS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CB11EC4CEE9; Fri, 9 May 2025 06:43:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746773014; bh=gdVVhqdD3Ya1ITljtKt8ojGq04WcBEf5eLCT4Ics7Gg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=cua+RgjSGP+n/li6vbXT43rS77TgBzUlcNEshhDzNIUIr0vTFWarvjx/d1h5p1PM8 uR1lt8dn/j0W78pfMFADVCViixWkF4ftUPm3zw46pFk2D8Z2xymXGJxWZpxsqdAb2b FBiXcZOgrEpCLFgkQ/pDs5RJFiW0yAigCc/8YsAg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37842: spi: fsl-qspi: use devm function instead of driver remove Date: Fri, 9 May 2025 08:42:20 +0200 Message-ID: <2025050916-CVE-2025-37842-8da3@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=2395; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=bOOFVuApDY6hal5IqFw4Zb2jnVQQD+iy0nlzkr5uWeg=; b=owGbwMvMwCRo6H6F97bub03G02pJDBmyi09M+bMgUKHpWuDJL7Pm5lj1/TI3/fGzPl4hm8v/y sOGZa6GHbEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjCRV7UMcyWKnpxd+YNTkNEn +NdkX0upL7faNjMsWOgkdnHVWm2+DfJxBSU7y9je1GZoAAA= 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: spi: fsl-qspi: use devm function instead of driver remove Driver use devm APIs to manage clk/irq/resources and register the spi controller, but the legacy remove function will be called first during device detach and trigger kernel panic. Drop the remove function and use devm_add_action_or_reset() for driver cleanup to ensure the release sequence. Trigger kernel panic on i.MX8MQ by echo 30bb0000.spi >/sys/bus/platform/drivers/fsl-quadspi/unbind The Linux kernel CVE team has assigned CVE-2025-37842 to this issue. Affected and fixed versions =========================== Issue introduced in 5.2 with commit 8fcb830a00f0980ffe38d223cdd9a4d2d24da476 and fixed in 6.13.12 with commit 439688dbe82baa10d4430dc3252bb5ef1183a171 Issue introduced in 5.2 with commit 8fcb830a00f0980ffe38d223cdd9a4d2d24da476 and fixed in 6.14.3 with commit f9bfb3a5f6f616f3eb7665c8ff3bcb9760ae33c8 Issue introduced in 5.2 with commit 8fcb830a00f0980ffe38d223cdd9a4d2d24da476 and fixed in 6.15-rc1 with commit 40369bfe717e96e26650eeecfa5a6363563df6e4 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-37842 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/spi/spi-fsl-qspi.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/439688dbe82baa10d4430dc3252bb5ef1183a171 https://git.kernel.org/stable/c/f9bfb3a5f6f616f3eb7665c8ff3bcb9760ae33c8 https://git.kernel.org/stable/c/40369bfe717e96e26650eeecfa5a6363563df6e4