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 AA9711AB526 for ; Thu, 20 Jun 2024 11:19:09 +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=1718882349; cv=none; b=akcGt67URFi8MbdqmUzM6PxfUwUl/HzhO2qO8Ojq01s7h8c0WnTz+rPDBvqgNQSNb/El0bHeVMNiTTI7zgX4wskEEzLugzOwN7GhpZNvMWf6KV+aB693hC8fMnUZUue4qVn15xetZHDDSwi+YjY86Eq+QDyK1lPr4+ryNMPV0yA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718882349; c=relaxed/simple; bh=5mGUMS/paBMBS2Ud299Po68wAxm2GkWDCJ+cakIulmA=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=np3m2pNA1yqIcjEOvqF5Op/8L2mTaROdK0ll2KO2PDEfBNusQ8uBMh5/gBmhYd55ecrc+lre3PXLqASf9izSq5GGCpT5SXz72ZnlfNJvEKVv94I9t98eJ6e5cjsQo7I557p/slKSM+GT6UzqPvczOBKDX6rX2ioHuvIdYcbiNHA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=UAmWVMb/; 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="UAmWVMb/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE528C2BD10; Thu, 20 Jun 2024 11:19:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718882349; bh=5mGUMS/paBMBS2Ud299Po68wAxm2GkWDCJ+cakIulmA=; h=From:To:Cc:Subject:Date:Reply-to:From; b=UAmWVMb/lolKQBna0vUkze0fwNdkTl/DX3jOp6bHRqSDn3bKGbSoEtrO0vE8Gd2K+ 97rRl+3z2oAJFlGsYGMpB7+HuCs0f08FArOcUeusSUpz3Q/vWhccKgKHue/mTHKCL/ LvsIU7FxAgrNUO24nrWEU3NsG3rN3AuqMj4lyxhs= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman , Abel Vesa Subject: CVE-2022-48761: usb: xhci-plat: fix crash when suspend if remote wake enable Date: Thu, 20 Jun 2024 13:16:41 +0200 Message-ID: <2024062008-CVE-2022-48761-51ee@gregkh> X-Mailer: git-send-email 2.45.2 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=3869; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=5mGUMS/paBMBS2Ud299Po68wAxm2GkWDCJ+cakIulmA=; b=owGbwMvMwCRo6H6F97bub03G02pJDGkl/BWVXW0TYj2OCOY8fb+HWfl6eO+f/5tWyjqdTluvz fU+50V1RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExE6z7DgrXCFhFzy97+fPxQ 6XvAvRM1Gg5NbgzzIy+ssFhw8OHfj88aZ/lesNuxo1XoOwA= 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: usb: xhci-plat: fix crash when suspend if remote wake enable Crashed at i.mx8qm platform when suspend if enable remote wakeup Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP Modules linked in: CPU: 2 PID: 244 Comm: kworker/u12:6 Not tainted 5.15.5-dirty #12 Hardware name: Freescale i.MX8QM MEK (DT) Workqueue: events_unbound async_run_entry_fn pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : xhci_disable_hub_port_wake.isra.62+0x60/0xf8 lr : xhci_disable_hub_port_wake.isra.62+0x34/0xf8 sp : ffff80001394bbf0 x29: ffff80001394bbf0 x28: 0000000000000000 x27: ffff00081193b578 x26: ffff00081193b570 x25: 0000000000000000 x24: 0000000000000000 x23: ffff00081193a29c x22: 0000000000020001 x21: 0000000000000001 x20: 0000000000000000 x19: ffff800014e90490 x18: 0000000000000000 x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000 x14: 0000000000000000 x13: 0000000000000002 x12: 0000000000000000 x11: 0000000000000000 x10: 0000000000000960 x9 : ffff80001394baa0 x8 : ffff0008145d1780 x7 : ffff0008f95b8e80 x6 : 000000001853b453 x5 : 0000000000000496 x4 : 0000000000000000 x3 : ffff00081193a29c x2 : 0000000000000001 x1 : 0000000000000000 x0 : ffff000814591620 Call trace: xhci_disable_hub_port_wake.isra.62+0x60/0xf8 xhci_suspend+0x58/0x510 xhci_plat_suspend+0x50/0x78 platform_pm_suspend+0x2c/0x78 dpm_run_callback.isra.25+0x50/0xe8 __device_suspend+0x108/0x3c0 The basic flow: 1. run time suspend call xhci_suspend, xhci parent devices gate the clock. 2. echo mem >/sys/power/state, system _device_suspend call xhci_suspend 3. xhci_suspend call xhci_disable_hub_port_wake, which access register, but clock already gated by run time suspend. This problem was hidden by power domain driver, which call run time resume before it. But the below commit remove it and make this issue happen. commit c1df456d0f06e ("PM: domains: Don't runtime resume devices at genpd_prepare()") This patch call run time resume before suspend to make sure clock is on before access register. Testeb-by: Abel Vesa The Linux kernel CVE team has assigned CVE-2022-48761 to this issue. Affected and fixed versions =========================== Fixed in 5.10.96 with commit 20c51a4c5220 Fixed in 5.15.19 with commit d5755832a1e4 Fixed in 5.16.5 with commit 8b05ad29acb9 Fixed in 5.17 with commit 9df478463d9f 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-48761 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/usb/host/xhci-plat.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/20c51a4c52208f98e27308c456a1951778f41fa5 https://git.kernel.org/stable/c/d5755832a1e47f5d8773f0776e211ecd4e02da72 https://git.kernel.org/stable/c/8b05ad29acb972850ad795fa850e814b2e758b83 https://git.kernel.org/stable/c/9df478463d9feb90dae24f183383961cf123a0ec