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 E77D914375D for ; Tue, 19 Nov 2024 17:31:58 +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=1732037519; cv=none; b=KkalFHfd52LwGI+YIlsr9jaD3xUnmqkCo4U17GD78d/eQkdYcnlaoutG2l2+gqIZ8+fZ3q3J3+/LneEYf4sSHw+jU/hUoKN7IC8p+ggj8jX0tqtL4S6H/lJD4gOkPcJ6dnks8Ib6fqgjti4VVKNX1Gxo9gKJg1Rj+UFexW3hlTM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732037519; c=relaxed/simple; bh=Rw7dycNmWZ5Ga+dJIHcQq5DSs2a3k3BuWWoWTuIHIkQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wa80yBK4WUoSnM+f1/NqOcq9Wgy0MndOCACnNSi2kY1lT2iBBZJWyvnHUGq6eusywG5WA7sAd3oQ7zvr6MU69wtlPCkC51yf6L5cWIosNgIAv8qIkGNxSF+MQKj9polFvikfh4zviS6fi/njsA2bJHQdC9wgSpYZcdtU2KsA8Zw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=fO1ia39h; 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="fO1ia39h" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52F09C4CED1; Tue, 19 Nov 2024 17:31:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1732037518; bh=Rw7dycNmWZ5Ga+dJIHcQq5DSs2a3k3BuWWoWTuIHIkQ=; h=From:To:Cc:Subject:Date:Reply-to:From; b=fO1ia39hTHEqx3EgtCYgshIXEK156q51dP/V+rNAnTQZ1WroKqFj7DUnQKAB0WFqW VmDmPp0CroVFySBJ2nzpzmRw1T2AUFgUXPr4+v/VTWuAtfJYHHaSWWvnSyS80Z1eCl P38PMG3x3s0kWpQuh7ydPE9SJSHMskutAeIdSxwQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53075: riscv: Prevent a bad reference count on CPU nodes Date: Tue, 19 Nov 2024 18:31:26 +0100 Message-ID: <2024111924-CVE-2024-53075-2e34@gregkh> X-Mailer: git-send-email 2.47.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=2311; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=Rw7dycNmWZ5Ga+dJIHcQq5DSs2a3k3BuWWoWTuIHIkQ=; b=owGbwMvMwCRo6H6F97bub03G02pJDOk2p3POFf6zLw/dXD+n4KNPTO/kNSVrl9yXrWlYOUl7v WQgm/+djlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjI9z8MC3btK4nhFXdKYdi4 5Yft+0b1mQyJyQwLTs2wM/7fdH//3azj541+JzHyWwfsBQA= 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: riscv: Prevent a bad reference count on CPU nodes When populating cache leaves we previously fetched the CPU device node at the very beginning. But when ACPI is enabled we go through a specific branch which returns early and does not call 'of_node_put' for the node that was acquired. Since we are not using a CPU device node for the ACPI code anyways, we can simply move the initialization of it just passed the ACPI block, and we are guaranteed to have an 'of_node_put' call for the acquired node. This prevents a bad reference count of the CPU device node. Moreover, the previous function did not check for errors when acquiring the device node, so a return -ENOENT has been added for that case. The Linux kernel CVE team has assigned CVE-2024-53075 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 604f32ea6909 and fixed in 6.11.7 with commit 303846a3dc27 Issue introduced in 6.11 with commit 604f32ea6909 and fixed in 6.12 with commit 37233169a6ea 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-53075 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: arch/riscv/kernel/cacheinfo.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/303846a3dc275e35fbb556d72f1e356ba669e4f8 https://git.kernel.org/stable/c/37233169a6ea912020c572f870075a63293b786a