From mboxrd@z Thu Jan 1 00:00:00 1970 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 A8CC52185BB for ; Wed, 26 Feb 2025 02:15:10 +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=1740536111; cv=none; b=QBVqSJcyq+WgOsQWR2s5BIUcIidVOgkIMT5EgKWZO/+sNklWlDoFfGjW6FqJA+0lfCf/yQNo9zOskZqdqbyx2brgfeluWMwO1Pn8j+caUfSndeHMe/jKh5scdSdpXZTpBl3lUIEEkmEejPC6kEWGr9f1qK9eCJolfUE2MIpL4OA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536111; c=relaxed/simple; bh=y+VeR1dhz9T6Kk592s9SZx8uWfkbDGxGOQR3eWIIJVc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=hSMpolCj5GL9CSZ8kgJHeihd80fM5Dz7Fu8duU1mkdfur5c9dajRSHAnpHZ16A5hF222AzqR8ygZwdGp7AJnjINmzLTdgCrdN+28s6f70CYYoTjxXgsCczv84mN8jVfVnvmvzbvTA5+rmqa8vfNnrMLEgyga1N9+CLsGsDIfUn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mihLJPLL; 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="mihLJPLL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7389BC4CEE6; Wed, 26 Feb 2025 02:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536110; bh=y+VeR1dhz9T6Kk592s9SZx8uWfkbDGxGOQR3eWIIJVc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=mihLJPLLyZ4alLUXeg1pq42JYvWuy+eYiPJim59qu+i24OprmkizpWlmwu8FV8Ka8 9behojGg5H4WXGD1hXhmXGmJEI7jJrJHcryvv+HS+6o3IcVr0pOzMusUDzgKlXTGcG Wb/+LGxc3FANCVUFA+yo3atN+twOqHLmG5dUjhBc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49506: drm/mediatek: Add vblank register/unregister callback functions Date: Wed, 26 Feb 2025 03:13:00 +0100 Message-ID: <2025022608-CVE-2022-49506-2808@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=2964; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=y+VeR1dhz9T6Kk592s9SZx8uWfkbDGxGOQR3eWIIJVc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7Khi2vNf4JZqw/fGGYkeB9hVLSy8mXC1TunItzfPe+ 91N9elXO2JZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiXuUMC24ez1DvfrD/yotl Dbp9RfP1527Yr8Ywz37m7Dc/paeoLmHynFyltW/1nq9NbQA= 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/mediatek: Add vblank register/unregister callback functions We encountered a kernel panic issue that callback data will be NULL when it's using in ovl irq handler. There is a timing issue between mtk_disp_ovl_irq_handler() and mtk_ovl_disable_vblank(). To resolve this issue, we use the flow to register/unregister vblank cb: - Register callback function and callback data when crtc creates. - Unregister callback function and callback data when crtc destroies. With this solution, we can assure callback data will not be NULL when vblank is disable. The Linux kernel CVE team has assigned CVE-2022-49506 to this issue. Affected and fixed versions =========================== Issue introduced in 5.12 with commit 9b0704988b151824a51133dc4c921f4273c5d839 and fixed in 5.15.54 with commit 8a2dbdeccef6de47565638abdf3c25f41cdffc37 Issue introduced in 5.12 with commit 9b0704988b151824a51133dc4c921f4273c5d839 and fixed in 5.17.14 with commit 8a265d9838bc3c63579002d55c2b2c655c4f8f26 Issue introduced in 5.12 with commit 9b0704988b151824a51133dc4c921f4273c5d839 and fixed in 5.18.3 with commit 3a4027b5971fe2a94e32754f007d9d3c12c68ad1 Issue introduced in 5.12 with commit 9b0704988b151824a51133dc4c921f4273c5d839 and fixed in 5.19 with commit b74d921b900b6ce38c6247c0a1c86be9f3746493 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-49506 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/mediatek/mtk_disp_drv.h drivers/gpu/drm/mediatek/mtk_disp_ovl.c drivers/gpu/drm/mediatek/mtk_disp_rdma.c drivers/gpu/drm/mediatek/mtk_drm_crtc.c drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.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/8a2dbdeccef6de47565638abdf3c25f41cdffc37 https://git.kernel.org/stable/c/8a265d9838bc3c63579002d55c2b2c655c4f8f26 https://git.kernel.org/stable/c/3a4027b5971fe2a94e32754f007d9d3c12c68ad1 https://git.kernel.org/stable/c/b74d921b900b6ce38c6247c0a1c86be9f3746493