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 59BF4AD5E for ; Mon, 2 Dec 2024 13:53:08 +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=1733147589; cv=none; b=Z5vsZKARQTienHszCTX8G0u8FaOo+52Xh1cY7iZMOtaGarOlM0SqrtNaeGUaoyS1yZBMAJ5kP/T1D7KqwZE63wGD6rLs8MDSA5muUlYvZurvw+YU9ug5kQy3b1Bj4WPH/LGCd5aUoskW2jksLsgF4bhiIuQJVuePcBBTjETuiRs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733147589; c=relaxed/simple; bh=uAke8Tof+tSSjnxXZTFjVDD2+TNYpq3ApgFJKjqsnmk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MCeUMqfjMvnDxZTcYdToBDfwjLYKFzfhk6O+oUmTccAqdLx+vufpXVKH4N+XNe34n4H3oJdHMVn8zMa8ZkGLHjeMgKvJeh/uvqKw6AGPRjpeZOVo+SRbfLIzyBxpz3WEDsU9lSlB5DphHO3BjxvOKg+l4iI8MF8GKT2AwvT7cJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=jj9sl55u; 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="jj9sl55u" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E1F9C4CED1; Mon, 2 Dec 2024 13:53:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1733147588; bh=uAke8Tof+tSSjnxXZTFjVDD2+TNYpq3ApgFJKjqsnmk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=jj9sl55uibICrIhC1mqVl1AVZ69WjUgn0wUNoyCRGTIR+b4mZ5UVzxkav8hOv6S8d Vc610gCVzHZYqSplZkcI0+a2m6QyGVAS0fYmTMp3hYRo3y3h5EQhFuNnUQqDGQ/z0M NEONLjmTFAD+yBYHM6+wka1BD52wV3PLp9G4sRZ8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53116: drm/panthor: Fix handling of partial GPU mapping of BOs Date: Mon, 2 Dec 2024 14:52:55 +0100 Message-ID: <2024120250-CVE-2024-53116-ab42@gregkh> X-Mailer: git-send-email 2.47.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=3458; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=uAke8Tof+tSSjnxXZTFjVDD2+TNYpq3ApgFJKjqsnmk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOm+uzctz31ktZn3PV+/seDsk4tnFv73CdzAtkj4gd38r d8P7D2+riOWhUGQiUFWTJHlyzaeo/srDil6GdqehpnDygQyhIGLUwAmcvI0w/yML6sPSmT80U3/ a96m68bSm39AK5Jhnq7prIpz5rynFn8T+frhv/WyN5d+PAEA 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/panthor: Fix handling of partial GPU mapping of BOs This commit fixes the bug in the handling of partial mapping of the buffer objects to the GPU, which caused kernel warnings. Panthor didn't correctly handle the case where the partial mapping spanned multiple scatterlists and the mapping offset didn't point to the 1st page of starting scatterlist. The offset variable was not cleared after reaching the starting scatterlist. Following warning messages were seen. WARNING: CPU: 1 PID: 650 at drivers/iommu/io-pgtable-arm.c:659 __arm_lpae_unmap+0x254/0x5a0 pc : __arm_lpae_unmap+0x254/0x5a0 lr : __arm_lpae_unmap+0x2cc/0x5a0 Call trace: __arm_lpae_unmap+0x254/0x5a0 __arm_lpae_unmap+0x108/0x5a0 __arm_lpae_unmap+0x108/0x5a0 __arm_lpae_unmap+0x108/0x5a0 arm_lpae_unmap_pages+0x80/0xa0 panthor_vm_unmap_pages+0xac/0x1c8 [panthor] panthor_gpuva_sm_step_unmap+0x4c/0xc8 [panthor] op_unmap_cb.isra.23.constprop.30+0x54/0x80 __drm_gpuvm_sm_unmap+0x184/0x1c8 drm_gpuvm_sm_unmap+0x40/0x60 panthor_vm_exec_op+0xa8/0x120 [panthor] panthor_vm_bind_exec_sync_op+0xc4/0xe8 [panthor] panthor_ioctl_vm_bind+0x10c/0x170 [panthor] drm_ioctl_kernel+0xbc/0x138 drm_ioctl+0x210/0x4b0 __arm64_sys_ioctl+0xb0/0xf8 invoke_syscall+0x4c/0x110 el0_svc_common.constprop.1+0x98/0xf8 do_el0_svc+0x24/0x38 el0_svc+0x34/0xc8 el0t_64_sync_handler+0xa0/0xc8 el0t_64_sync+0x174/0x178 panthor : [drm] drm_WARN_ON(unmapped_sz != pgsize * pgcount) WARNING: CPU: 1 PID: 650 at drivers/gpu/drm/panthor/panthor_mmu.c:922 panthor_vm_unmap_pages+0x124/0x1c8 [panthor] pc : panthor_vm_unmap_pages+0x124/0x1c8 [panthor] lr : panthor_vm_unmap_pages+0x124/0x1c8 [panthor] panthor : [drm] *ERROR* failed to unmap range ffffa388f000-ffffa3890000 (requested range ffffa388c000-ffffa3890000) The Linux kernel CVE team has assigned CVE-2024-53116 to this issue. Affected and fixed versions =========================== Issue introduced in 6.10 with commit 647810ec2476 and fixed in 6.11.10 with commit d3e61af64b77 Issue introduced in 6.10 with commit 647810ec2476 and fixed in 6.12 with commit 3387e043918e 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-53116 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/panthor/panthor_mmu.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/d3e61af64b770e0038470c81f42bd1d0598f6bcc https://git.kernel.org/stable/c/3387e043918e154ca08d83954966a8b087fe2835