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 37F091DDCE for ; Sun, 19 May 2024 10:12:18 +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=1716113538; cv=none; b=slOXyl3+VYt46KNEIF1fOaksijbAbs5LR1vQE3/ZRGAYsS3EM/VQJqUyH9Vxd81orsnfRhaxA7LFGtUsRksPH0SkClU+5sYwAkdWH8JGHl/K/gcu6Tnp7EFji4ScCCMsKUgZRC+mKrnggX1hisWhbOc6JDrVOdwidQaJc/K7kPo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716113538; c=relaxed/simple; bh=ADAVpNzVQuGbUw5uKeC/MwCyozlCdWxxYKbY4BWq5fs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TbthjvedmfKxtuxgVQzKr3ea4V6eibvTy7p7jc4xBd6gE/U0S46nl/wT8AVHn9k2QGmCHDja9awPlbPAVlTpSN9AG9jo9i7EyMk7g506FU7fK+arIS6NqiInhIu9l2hC1gYDPC+momnSdyOjJF0eZIvyaXSxGHu6v2u96AajzCc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=TntEBKs1; 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="TntEBKs1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B273AC32781; Sun, 19 May 2024 10:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1716113538; bh=ADAVpNzVQuGbUw5uKeC/MwCyozlCdWxxYKbY4BWq5fs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=TntEBKs13sUKRo1zqET8txxISUsGwGRMDjAKgydRv7CMxvOJytu9h34VdQXHSOfXM 8ZteWLp/0r0h9daB02HOE27O3EQaq83C+d2RCEo56e+C+2nQgmtkwNPuW2qsYnedxK EQXKPLtEYrVRhmdEzeSFoLzhfRDc5nWW3v0QaplU= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-35920: media: mediatek: vcodec: adding lock to protect decoder context list Date: Sun, 19 May 2024 12:11:14 +0200 Message-ID: <2024051913-CVE-2024-35920-ceed@gregkh> X-Mailer: git-send-email 2.45.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=3812; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=ADAVpNzVQuGbUw5uKeC/MwCyozlCdWxxYKbY4BWq5fs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmeFxzva3FtYJgty8C0vXXi5+cTTgp7dem+lm7cULS5T GBd/NeCjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIpjLD/HS5z3vfKm0wX/9X ePPk+12PXbZcLmKYK//c4sHi8twLZvoHH//LSmPeobrgDQA= 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: media: mediatek: vcodec: adding lock to protect decoder context list Add a lock for the ctx_list, to avoid accessing a NULL pointer within the 'vpu_dec_ipi_handler' function when the ctx_list has been deleted due to an unexpected behavior on the SCP IP block. Hardware name: Google juniper sku16 board (DT) pstate: 20400005 (nzCv daif +PAN -UAO -TCO BTYPE=--) pc : vpu_dec_ipi_handler+0x58/0x1f8 [mtk_vcodec_dec] lr : scp_ipi_handler+0xd0/0x194 [mtk_scp] sp : ffffffc0131dbbd0 x29: ffffffc0131dbbd0 x28: 0000000000000000 x27: ffffff9bb277f348 x26: ffffff9bb242ad00 x25: ffffffd2d440d3b8 x24: ffffffd2a13ff1d4 x23: ffffff9bb7fe85a0 x22: ffffffc0133fbdb0 x21: 0000000000000010 x20: ffffff9b050ea328 x19: ffffffc0131dbc08 x18: 0000000000001000 x17: 0000000000000000 x16: ffffffd2d461c6e0 x15: 0000000000000242 x14: 000000000000018f x13: 000000000000004d x12: 0000000000000000 x11: 0000000000000001 x10: fffffffffffffff0 x9 : ffffff9bb6e793a8 x8 : 0000000000000000 x7 : 0000000000000000 x6 : 000000000000003f x5 : 0000000000000040 x4 : fffffffffffffff0 x3 : 0000000000000020 x2 : ffffff9bb6e79080 x1 : 0000000000000010 x0 : ffffffc0131dbc08 Call trace: vpu_dec_ipi_handler+0x58/0x1f8 [mtk_vcodec_dec (HASH:6c3f 2)] scp_ipi_handler+0xd0/0x194 [mtk_scp (HASH:7046 3)] mt8183_scp_irq_handler+0x44/0x88 [mtk_scp (HASH:7046 3)] scp_irq_handler+0x48/0x90 [mtk_scp (HASH:7046 3)] irq_thread_fn+0x38/0x94 irq_thread+0x100/0x1c0 kthread+0x140/0x1fc ret_from_fork+0x10/0x30 Code: 54000088 f94ca50a eb14015f 54000060 (f9400108) ---[ end trace ace43ce36cbd5c93 ]--- Kernel panic - not syncing: Oops: Fatal exception SMP: stopping secondary CPUs Kernel Offset: 0x12c4000000 from 0xffffffc010000000 PHYS_OFFSET: 0xffffffe580000000 CPU features: 0x08240002,2188200c Memory Limit: none The Linux kernel CVE team has assigned CVE-2024-35920 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6 with commit 655b86e52eac and fixed in 6.6.27 with commit 0a2dc707aa42 Issue introduced in 6.6 with commit 655b86e52eac and fixed in 6.8.6 with commit 23aaf8241210 Issue introduced in 6.6 with commit 655b86e52eac and fixed in 6.9 with commit 6467cda18c9f 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-35920 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/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.c drivers/media/platform/mediatek/vcodec/decoder/mtk_vcodec_dec_drv.h drivers/media/platform/mediatek/vcodec/decoder/vdec_vpu_if.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/0a2dc707aa42214f9c4827bd57e344e29a0841d6 https://git.kernel.org/stable/c/23aaf824121055ba81b55f75444355bd83c8eb38 https://git.kernel.org/stable/c/6467cda18c9f9b5f2f9a0aa1e2861c653e41f382