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 4947A19007D for ; Sat, 11 Jan 2025 12:25:45 +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=1736598346; cv=none; b=UFuw+vSYdEYZMsSBX5GlLooySlAbaF1G+KIqFlu+PS5eFoFvGAOVfSYp7QRd/o32FFF0hVViN+pOVssHGKciTL1LQ45F7CpxTcURnnRrQVSqpjNiaH73Puj58NMexpccU4/ze5Y0GBNrPqKD0ez/j+pBZmax52awyZcSvw3ozZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736598346; c=relaxed/simple; bh=3bmDZFPARWgnJ7aFOkwqz8BOaAxK4r/Ngh2qk6wZt2Q=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MEvB5f+ynfIUn3A/k39NUDID7rFi1AgKaxIsjC61f92O0al0mo2QwtGbiqOwf1skkACeyELsdAhodoZSQ1bifcoq/ifj05cjT8gtxv02ox6YE/u/h8tLLZ7I6lkgJ9T28oECTIMk+hAt4uFgJBO9GeSp0pGjeiLYG2F5gWRHKDA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FelqRQdf; 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="FelqRQdf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CDC3C4CED2; Sat, 11 Jan 2025 12:25:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1736598345; bh=3bmDZFPARWgnJ7aFOkwqz8BOaAxK4r/Ngh2qk6wZt2Q=; h=From:To:Cc:Subject:Date:Reply-to:From; b=FelqRQdfDdAiKEyDktCXdwukIK2TnNep3Yw13DSXoEOpeJDS5xUAPXcmmjq5wrffZ ZB9sUd8t/XAGcreIqxUE1F31rxx4Ot37f2sT2IGI5AbOTyMcmSDTGfoOGXYH4qw8cy 3VVu7MWd+ruY1i3CFwou5L+f7r32aJo6SO8hNFUk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50051: spi: mpc52xx: Add cancel_work_sync before module remove Date: Sat, 11 Jan 2025 13:25:29 +0100 Message-ID: <2025011122-CVE-2024-50051-d822@gregkh> X-Mailer: git-send-email 2.48.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=3221; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=3bmDZFPARWgnJ7aFOkwqz8BOaAxK4r/Ngh2qk6wZt2Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDOlNyUZP9kvIZiVe/3w9tdCbWyNy/u2VH1qEu7q95BsPW qYu16vpiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIk8q2RYsKnzb0qfsWr1DLvu 99WybjsvrZh8jGHBESmxL7Yy8YHxy94WLRXdyNB41FAFAA== 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: spi: mpc52xx: Add cancel_work_sync before module remove If we remove the module which will call mpc52xx_spi_remove it will free 'ms' through spi_unregister_controller. while the work ms->work will be used. The sequence of operations that may lead to a UAF bug. Fix it by ensuring that the work is canceled before proceeding with the cleanup in mpc52xx_spi_remove. The Linux kernel CVE team has assigned CVE-2024-50051 to this issue. Affected and fixed versions =========================== Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 5.4.287 with commit d0cde3911cf24e1bcdd4caa1d1b9ef57589db5a1 Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 5.10.231 with commit e0c6ce8424095c2da32a063d3fc027494c689817 Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 5.15.174 with commit cd5106c77d6d6828aa82449f01f4eb436d602a21 Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 6.1.120 with commit 373d55a47dc662e5e30d12ad5d334312f757c1f1 Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 6.6.66 with commit f65d85bc1ffd8a2c194bb2cd65e35ed3648ddd59 Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 6.12.5 with commit 90b72189de2cddacb26250579da0510b29a8b82b Issue introduced in 3.1 with commit ca632f556697d45d67ed5cada7cedf3ddfe0db4b and fixed in 6.13-rc2 with commit 984836621aad98802d92c4a3047114cf518074c8 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-2024-50051 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-mpc52xx.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/d0cde3911cf24e1bcdd4caa1d1b9ef57589db5a1 https://git.kernel.org/stable/c/e0c6ce8424095c2da32a063d3fc027494c689817 https://git.kernel.org/stable/c/cd5106c77d6d6828aa82449f01f4eb436d602a21 https://git.kernel.org/stable/c/373d55a47dc662e5e30d12ad5d334312f757c1f1 https://git.kernel.org/stable/c/f65d85bc1ffd8a2c194bb2cd65e35ed3648ddd59 https://git.kernel.org/stable/c/90b72189de2cddacb26250579da0510b29a8b82b https://git.kernel.org/stable/c/984836621aad98802d92c4a3047114cf518074c8