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 ADC3F2153E8 for ; Wed, 26 Feb 2025 02:13:23 +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=1740536003; cv=none; b=c7VhAv3ZyVTm4Rx9ud3MTwQiuM5b7AVkjW36nrIuNIwhYvQEb9bFs5LkWPlfrh2NFZeQkccapY9AzOp9RPBom4sgze98u9W5//8JjlZ4fipsK7zpJ+3t/+fYtMWGeoKcDg11Si5rG0i7j/10+j8LhJja2bUmfarUxwGMIjrIZoM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536003; c=relaxed/simple; bh=mih04uuZYooRl0L0F/3oPGIhT3F0ILpNaQrCpxSAbN8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ej5k/XxxsWrDNQeZgEC9/X5NOxm0D9Hx65tBBv30dCF7Vxnn5h+fn4wQWpKKpSsYV2NgHs7UhI/i2paFG43oIbp4QveZGqboe2ixXjG6HHLMtwPnlFgeh+c5qQVDRCbvR0Ic3xPRztIjcrOq0UIX427XpGfPp45LiZAG126LI1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=daUCA2wd; 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="daUCA2wd" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 82C65C4CEDD; Wed, 26 Feb 2025 02:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536003; bh=mih04uuZYooRl0L0F/3oPGIhT3F0ILpNaQrCpxSAbN8=; h=From:To:Cc:Subject:Date:Reply-to:From; b=daUCA2wd0tkABPNhRU/nMQlac0gQ8w4lWE5VM1k4xWxnTa9CbBW6XH413QSKoyFJl uruRNtZTC2hbtlv45mMWKZTfHbFARuOyJWCKTgxFNmqQanS7pq+Mr1Tvnb0GZYigYH GuFpFWm+iJenyBDwLlcXQScHM7PitZpMWyHYrP+s= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49359: drm/panfrost: Job should reference MMU not file_priv Date: Wed, 26 Feb 2025 03:10:33 +0100 Message-ID: <2025022644-CVE-2022-49359-f054@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=2792; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=mih04uuZYooRl0L0F/3oPGIhT3F0ILpNaQrCpxSAbN8=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7yl8cEk1N2MYpLbOoLKLPb/EWT7lbVqzsdZEOtx5EF 0TsymPqiGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIkoGzPMU5e72ZLm+crjyibF uIS4KtbTv97uYphnKmlxqyVC7Nh0DaFtYuftikouph4AAA== 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/panfrost: Job should reference MMU not file_priv For a while now it's been allowed for a MMU context to outlive it's corresponding panfrost_priv, however the job structure still references panfrost_priv to get hold of the MMU context. If panfrost_priv has been freed this is a use-after-free which I've been able to trigger resulting in a splat. To fix this, drop the reference to panfrost_priv in the job structure and add a direct reference to the MMU structure which is what's actually needed. The Linux kernel CVE team has assigned CVE-2022-49359 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 7fdc48cc63a30fa3480d18bdd8c5fff2b9b15212 and fixed in 5.17.15 with commit 8c8e8cc91a6ffc79865108279a74fd57d9070a17 Issue introduced in 5.15 with commit 7fdc48cc63a30fa3480d18bdd8c5fff2b9b15212 and fixed in 5.18.4 with commit 472dd7ea5e19a1aeabf1711ddc756777e05ee7c2 Issue introduced in 5.15 with commit 7fdc48cc63a30fa3480d18bdd8c5fff2b9b15212 and fixed in 5.19 with commit 6e516faf04317db2c46cbec4e3b78b4653a5b109 Issue introduced in 5.10.67 with commit c29485e34e63198dca6289639aa711f99d88e76e Issue introduced in 5.13.19 with commit 626adede2642f00c8918999a2451bd0a644ab9b7 Issue introduced in 5.14.6 with commit cf461fa9250a634e8afc4433d82ae0decea8136e 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-49359 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/panfrost/panfrost_drv.c drivers/gpu/drm/panfrost/panfrost_job.c drivers/gpu/drm/panfrost/panfrost_job.h 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/8c8e8cc91a6ffc79865108279a74fd57d9070a17 https://git.kernel.org/stable/c/472dd7ea5e19a1aeabf1711ddc756777e05ee7c2 https://git.kernel.org/stable/c/6e516faf04317db2c46cbec4e3b78b4653a5b109