From mboxrd@z Thu Jan 1 00:00:00 1970 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 BDAF6217660 for ; Wed, 26 Feb 2025 02:14:36 +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=1740536076; cv=none; b=ARvgifmXqbPTOlNUtn5kqLyuzu0PZ+EYpTiwjOyu3+nkJHYMDe1bHpa6X3QIN5Je9FUVuLHGKcRPJZx6DT7pDFM0VbFNy2YXde5CWJyNhySTes0YOKW4NK6cTC7ANRIF1WcnM8iDLyjbXDzoECFTBkyVVpn8D5TAtVqrr3xDgDI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536076; c=relaxed/simple; bh=THoFnHWbT+8jeblvKShDiCQaFKmrwK4FN3+p24TNB2I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=h4g7XlVSQBWazKCweZLv1IoRJ4vc+vMShH5wPhlm0a1H6qhvanPNg6fC+Q4BUzDEFiQyLLLxo22KaMNFb/uf14TG0EzfiRwXipdktx5G8z6LScsbEpBOSHzlHxCMsIBbYFklgUgVLRT3JeYF0oMHE+10Hg3CcA76MB1AX7iHh+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jK0Pg6NY; 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="jK0Pg6NY" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9117CC4CEDD; Wed, 26 Feb 2025 02:14:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536076; bh=THoFnHWbT+8jeblvKShDiCQaFKmrwK4FN3+p24TNB2I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jK0Pg6NYOfrBQLnyWuPVqena3QmsAbnvPAi51cFNsWfk0jaWssqOo4UIYL3+YMgEJ ZP5nc58AhheKwVKXftx5jgu0/Lq/QKS3L6/HNGki8KkItQLqh4fB3KC9XJoaLTf1OM r3n46MY4nkaalqQcxgQADatcCksQNQdo7vUmZtPg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49460: PM / devfreq: rk3399_dmc: Disable edev on remove() Date: Wed, 26 Feb 2025 03:12:14 +0100 Message-ID: <2025022600-CVE-2022-49460-4733@gregkh> X-Mailer: git-send-email 2.48.1 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=3732; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=THoFnHWbT+8jeblvKShDiCQaFKmrwK4FN3+p24TNB2I=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yn/e2Z9TzNMozXql3i7a9Pw6jR38vxL0X4tzLWnYI Fb0PrO9I5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACay5QPDbJbbXGGPGfNlI9aY HHc33br2pGWEKMOC1bslBFYsm7R5ysoD97d80DzQuHd6EgA= 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: PM / devfreq: rk3399_dmc: Disable edev on remove() Otherwise we hit an unablanced enable-count when unbinding the DFI device: [ 1279.659119] ------------[ cut here ]------------ [ 1279.659179] WARNING: CPU: 2 PID: 5638 at drivers/devfreq/devfreq-event.c:360 devfreq_event_remove_edev+0x84/0x8c ... [ 1279.659352] Hardware name: Google Kevin (DT) [ 1279.659363] pstate: 80400005 (Nzcv daif +PAN -UAO -TCO BTYPE=--) [ 1279.659371] pc : devfreq_event_remove_edev+0x84/0x8c [ 1279.659380] lr : devm_devfreq_event_release+0x1c/0x28 ... [ 1279.659571] Call trace: [ 1279.659582] devfreq_event_remove_edev+0x84/0x8c [ 1279.659590] devm_devfreq_event_release+0x1c/0x28 [ 1279.659602] release_nodes+0x1cc/0x244 [ 1279.659611] devres_release_all+0x44/0x60 [ 1279.659621] device_release_driver_internal+0x11c/0x1ac [ 1279.659629] device_driver_detach+0x20/0x2c [ 1279.659641] unbind_store+0x7c/0xb0 [ 1279.659650] drv_attr_store+0x2c/0x40 [ 1279.659663] sysfs_kf_write+0x44/0x58 [ 1279.659672] kernfs_fop_write_iter+0xf4/0x190 [ 1279.659684] vfs_write+0x2b0/0x2e4 [ 1279.659693] ksys_write+0x80/0xec [ 1279.659701] __arm64_sys_write+0x24/0x30 [ 1279.659714] el0_svc_common+0xf0/0x1d8 [ 1279.659724] do_el0_svc_compat+0x28/0x3c [ 1279.659738] el0_svc_compat+0x10/0x1c [ 1279.659746] el0_sync_compat_handler+0xa8/0xcc [ 1279.659758] el0_sync_compat+0x188/0x1c0 [ 1279.659768] ---[ end trace cec200e5094155b4 ]--- The Linux kernel CVE team has assigned CVE-2022-49460 to this issue. Affected and fixed versions =========================== Fixed in 4.19.247 with commit 664736e2cc09e504ce58ec61164d029d1f2651bb Fixed in 5.4.198 with commit a0180e324a9a63de8f770da300477b48cb4a53f1 Fixed in 5.10.121 with commit 86b091b6894c449d2734de7aa7d79ccb33ffd97d Fixed in 5.15.46 with commit cb1be1d4be18fe286ba5a67d928598378fd7fbe5 Fixed in 5.17.14 with commit fb089b6f21de03a685dd31df3789bbb01c59f8e3 Fixed in 5.18.3 with commit a9c2b23a7ac6ab19214cad8cac8af8608a4d9cef Fixed in 5.19 with commit 2fccf9e6050e0e3b8b4cd275d41daf7f7fa22804 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-2022-49460 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/devfreq/rk3399_dmc.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/664736e2cc09e504ce58ec61164d029d1f2651bb https://git.kernel.org/stable/c/a0180e324a9a63de8f770da300477b48cb4a53f1 https://git.kernel.org/stable/c/86b091b6894c449d2734de7aa7d79ccb33ffd97d https://git.kernel.org/stable/c/cb1be1d4be18fe286ba5a67d928598378fd7fbe5 https://git.kernel.org/stable/c/fb089b6f21de03a685dd31df3789bbb01c59f8e3 https://git.kernel.org/stable/c/a9c2b23a7ac6ab19214cad8cac8af8608a4d9cef https://git.kernel.org/stable/c/2fccf9e6050e0e3b8b4cd275d41daf7f7fa22804