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 B6F516BB29 for ; Thu, 4 Apr 2024 08:24:39 +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=1712219079; cv=none; b=Ror/W4nXdTGSfoPweC3XmyLg6KqtXEvF+AciSdyU8ubQzkz4pxoNe3U1AAAcdb1m9dkxAoxp+ivZK8RqaKFVslBcbwu260dZaaBFbiVGbimIRO8EvC7wWsGS6H3XBjl1W+FJtZjygqSWAOgVad6bC4yK5yBNaZhDBWJdAgbQvHY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712219079; c=relaxed/simple; bh=wOnUjCy+1M1NSTfanO7LLSz8vzH023xB7MQoVw/3gEM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=L8PHiKwBW7hYcFDQNo4PoUmcswS4kQU9eHQO7WT+PKofF1+2TrOMu4Zk/2O/sWCJYYv0pO6dAAhYh9Uo55MKvfCq3Jp4T9Hl1jr3qBiHx2my4xCjDv0LkOm7D9XPRfM0+Q5uCru6xBD0Ca83wYBc0AKw1lzSgqJ3vAbxQ/f3/i0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QmDYK8Dg; 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="QmDYK8Dg" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2259FC433C7; Thu, 4 Apr 2024 08:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712219079; bh=wOnUjCy+1M1NSTfanO7LLSz8vzH023xB7MQoVw/3gEM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QmDYK8Dglj8ag86VQN3dfNZyo+c7fDsb5plo2ndXAHN1kdcwSL533CjCk8PmIMOPN 2Ev7CU1KzFzV7jwfVDNf+NW7ZazT42kvK7Rp7Iz7Ehw4+wCZmVdr5RKneMvSK46gfj g+6HzCOgvltqdLAqdIF6yqcCb1FDjQpk7A66pes4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26784: pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal Date: Thu, 4 Apr 2024 10:23:01 +0200 Message-ID: <2024040459-CVE-2024-26784-9e9c@gregkh> X-Mailer: git-send-email 2.44.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=2793; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=wOnUjCy+1M1NSTfanO7LLSz8vzH023xB7MQoVw/3gEM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGl8yckvj03MYlNePe/Eo+hbF1vlnhUWuPfuOSv8Jpnr9 iQx5fMnOmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiGxYyLDgvo79kpZ+twIaT 1408xIP1Z7T3nWVY0HF3XteOHatZO+w2ZeicmP/6fn6hGwA= 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: pmdomain: arm: Fix NULL dereference on scmi_perf_domain removal On unloading of the scmi_perf_domain module got the below splat, when in the DT provided to the system under test the '#power-domain-cells' property was missing. Indeed, this particular setup causes the probe to bail out early without giving any error, which leads to the ->remove() callback gets to run too, but without all the expected initialized structures in place. Add a check and bail out early on remove too. Call trace: scmi_perf_domain_remove+0x28/0x70 [scmi_perf_domain] scmi_dev_remove+0x28/0x40 [scmi_core] device_remove+0x54/0x90 device_release_driver_internal+0x1dc/0x240 driver_detach+0x58/0xa8 bus_remove_driver+0x78/0x108 driver_unregister+0x38/0x70 scmi_driver_unregister+0x28/0x180 [scmi_core] scmi_perf_domain_driver_exit+0x18/0xb78 [scmi_perf_domain] __arm64_sys_delete_module+0x1a8/0x2c0 invoke_syscall+0x50/0x128 el0_svc_common.constprop.0+0x48/0xf0 do_el0_svc+0x24/0x38 el0_svc+0x34/0xb8 el0t_64_sync_handler+0x100/0x130 el0t_64_sync+0x190/0x198 Code: a90153f3 f9403c14 f9414800 955f8a05 (b9400a80) ---[ end trace 0000000000000000 ]--- The Linux kernel CVE team has assigned CVE-2024-26784 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit 2af23ceb8624 and fixed in 6.7.9 with commit f6aaf131e4d4 Issue introduced in 6.7 with commit 2af23ceb8624 and fixed in 6.8 with commit eb5555d422d0 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-26784 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/pmdomain/arm/scmi_perf_domain.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/f6aaf131e4d4a9a26040ecc018eb70ab8b3d355d https://git.kernel.org/stable/c/eb5555d422d0fc325e1574a7353d3c616f82d8b5