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 6905D7489 for ; Fri, 8 Nov 2024 05:39:05 +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=1731044345; cv=none; b=oNuU3XC7NwWI2afe8fjwy38+LooNyqll+CfwR+VkV0CHotLikt3Gm3b5h5DywsqhwRFeeqfDcG71eHdL0x8yJVgd9e1qwfngxF/93Ltvnq0NyCiFbqK6kCUleIUeoRx/VgCw9boOYwP3TT/ciImdotIYDRFkseavrRQNmIAJqgE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731044345; c=relaxed/simple; bh=GHgE4RWjH9qnNJysw/WDB1CuogeDGA0UlCKev2wkIHg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Q+oid7DIM6PqJaP0sgIafwX2E1Nv97ivZSmwy0fyuqds1/Ou51Ui+GiD7QoiviJZ4cxV0Bf2Avq38Kg5c4x9mqgD3ov3j5YlLDKqmTKNiH5JwLA6zopHJipQWsqL6R9detgHhIG6prpqJ3X9uJTSPswuqszEZz4p6INMpzQD1vQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VjEo8Cet; 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="VjEo8Cet" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAC8CC4CECE; Fri, 8 Nov 2024 05:39:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1731044345; bh=GHgE4RWjH9qnNJysw/WDB1CuogeDGA0UlCKev2wkIHg=; h=From:To:Cc:Subject:Date:Reply-to:From; b=VjEo8Cetz0dmp4XicfXDKSpuYpl4sQyzge1jZDWYroHJyQT1v5d0vUDPQeU/6xqc/ wKePVJuB+T1OL6ofr8oX2dAgMGlcAgf1X5hSugKbrVyEom/WJThXWbsBA0tWJNVnFR RDClxeBSqLYFwP4kA109lDamCk9quH+W0fFDWINM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50187: drm/vc4: Stop the active perfmon before being destroyed Date: Fri, 8 Nov 2024 06:38:40 +0100 Message-ID: <2024110835-CVE-2024-50187-f2b0@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=2753; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=GHgE4RWjH9qnNJysw/WDB1CuogeDGA0UlCKev2wkIHg=; b=owGbwMvMwCRo6H6F97bub03G02pJDOm6i29f3+7Ep1ce/KCsK4NDSF9SXWXlVJ4qbV3ByqyQG fN9Sk93xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwET+NjHMj8vpVU3KO7Nkdmtu rfS6WXqea3+YMSzovPRo4aTTe0t2y1W8/ijimKG0vu0gAA== 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: drm/vc4: Stop the active perfmon before being destroyed Upon closing the file descriptor, the active performance monitor is not stopped. Although all perfmons are destroyed in `vc4_perfmon_close_file()`, the active performance monitor's pointer (`vc4->active_perfmon`) is still retained. If we open a new file descriptor and submit a few jobs with performance monitors, the driver will attempt to stop the active performance monitor using the stale pointer in `vc4->active_perfmon`. However, this pointer is no longer valid because the previous process has already terminated, and all performance monitors associated with it have been destroyed and freed. To fix this, when the active performance monitor belongs to a given process, explicitly stop it before destroying and freeing it. The Linux kernel CVE team has assigned CVE-2024-50187 to this issue. Affected and fixed versions =========================== Issue introduced in 4.17 with commit 65101d8c9108 and fixed in 6.1.113 with commit 75452da51e24 Issue introduced in 4.17 with commit 65101d8c9108 and fixed in 6.6.57 with commit 937943c04250 Issue introduced in 4.17 with commit 65101d8c9108 and fixed in 6.11.4 with commit c9adba739d5f Issue introduced in 4.17 with commit 65101d8c9108 and fixed in 6.12-rc3 with commit 0b2ad4f6f2be 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-50187 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/gpu/drm/vc4/vc4_perfmon.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/75452da51e2403e14be007df80d133e1443fc967 https://git.kernel.org/stable/c/937943c042503dc6087438bf3557f9057a588ba0 https://git.kernel.org/stable/c/c9adba739d5f7cdc47a7754df4a17b47b1ecf513 https://git.kernel.org/stable/c/0b2ad4f6f2bec74a5287d96cb2325a5e11706f22