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 29D4332ED42 for ; Mon, 15 Sep 2025 14:52:28 +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=1757947948; cv=none; b=EIET3exvvQNhgzavZB9k0OgP1fPF9alB13WpBWfmba15pYtQ5yT8n9gT7nc0gw4uEsuJ7rx270K+xKbFL86rdagpDTbKQ/PPKbeA3OBYvyptB5fPCkjx2HTYzpwj749uW2n0iNln7bWxkdNyF2X9GL2dWvoJX1FmUoLSea1svjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757947948; c=relaxed/simple; bh=SY0x1z+UgARv9CmVQMgTap/drt66E2R41kuq/i7QLwY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MFu0KvYi3EgDhcOILU8M5fujiLQCoIBwTvRoX7y5Q3GnNDuab+SJ7KYeuH2X1RRcOInpgOMxiMOdSOGJL1RT34oOJ6qUmntKuDlCeuAurf+dkjOI2+fKzgf43xwRF6rWeOLFHtq3aBQj/PRDvu4raMMuAJdQAdtrvKYvaTgf0yI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=rQUYUws6; 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="rQUYUws6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA288C4CEF7; Mon, 15 Sep 2025 14:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1757947948; bh=SY0x1z+UgARv9CmVQMgTap/drt66E2R41kuq/i7QLwY=; h=From:To:Cc:Subject:Date:Reply-to:From; b=rQUYUws6+IVWRuj66Jyh60xb676e0g4KkNjrTyOTjTxwerIp2scTpk7GvVa0bTbDh CFtN+LSAwteH/Fm1JoGP5y2bF9sYzc/OWxfw7vv2AmKqESJ9FXOzJovvrWJx5TurE4 LqXCcr/wN91sywdv/klo9CmTgF9m1LuL3ynx2++o= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-50319: coresight: trbe: remove cpuhp instance node before remove cpuhp state Date: Mon, 15 Sep 2025 16:48:56 +0200 Message-ID: <2025091553-CVE-2022-50319-6747@gregkh> X-Mailer: git-send-email 2.51.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=3239; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=QtsmZObzZ+Ld5y4kQuoXhLF17Naqh8dXpg61JDgn3iI=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkn1EMtpAVERPh3qd9uVzQRuRPx8ZypvXJS0alt5yJPX rKd8zWuI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACYiHcywoFvB9lqvzFMNvc3y EvZF4v/ck6/xMyxYkmfS2Kw/R+CViHb/1h7Jh4nZHvkA 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: coresight: trbe: remove cpuhp instance node before remove cpuhp state cpuhp_state_add_instance() and cpuhp_state_remove_instance() should be used in pairs. Or there will lead to the warn on cpuhp_remove_multi_state() since the cpuhp_step list is not empty. The following is the error log with 'rmmod coresight-trbe': Error: Removing state 215 which has instances left. Call trace: __cpuhp_remove_state_cpuslocked+0x144/0x160 __cpuhp_remove_state+0xac/0x100 arm_trbe_device_remove+0x2c/0x60 [coresight_trbe] platform_remove+0x34/0x70 device_remove+0x54/0x90 device_release_driver_internal+0x1e4/0x250 driver_detach+0x5c/0xb0 bus_remove_driver+0x64/0xc0 driver_unregister+0x3c/0x70 platform_driver_unregister+0x20/0x30 arm_trbe_exit+0x1c/0x658 [coresight_trbe] __arm64_sys_delete_module+0x1ac/0x24c invoke_syscall+0x50/0x120 el0_svc_common.constprop.0+0x58/0x1a0 do_el0_svc+0x38/0xd0 el0_svc+0x2c/0xc0 el0t_64_sync_handler+0x1ac/0x1b0 el0t_64_sync+0x19c/0x1a0 ---[ end trace 0000000000000000 ]--- The Linux kernel CVE team has assigned CVE-2022-50319 to this issue. Affected and fixed versions =========================== Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 5.15.86 with commit 18b9202188a4e59923834c60b5c82ea1da7d1811 Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.0.16 with commit 2ea334960afcd49385840c7afd59fc5f8d3ce682 Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.1.2 with commit 3c18888bc0b51835c74123b1e04d5df11543724c Issue introduced in 5.13 with commit 3fbf7f011f2426dac8c982f1d2ef469a7959a524 and fixed in 6.2 with commit 20ee8c223f792947378196307d8e707c9cdc2d61 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-50319 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/hwtracing/coresight/coresight-trbe.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/18b9202188a4e59923834c60b5c82ea1da7d1811 https://git.kernel.org/stable/c/2ea334960afcd49385840c7afd59fc5f8d3ce682 https://git.kernel.org/stable/c/3c18888bc0b51835c74123b1e04d5df11543724c https://git.kernel.org/stable/c/20ee8c223f792947378196307d8e707c9cdc2d61