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 1A9CD2ECEA9 for ; Fri, 25 Jul 2025 12:56:48 +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=1753448209; cv=none; b=Mg9HWTOgE/YI6GvMF370u6S+11Ia9Sgek7/rmvd11N5yiuSsYk8CkomE/K89xexFk1nJlmEvcIRyz+ODxprcs2elhNi/ofDNe3eNacRRvMiJ94QV9ZyUqgFLUR77Vbwe9vnnDEIBvorOSyVmqJizl9l8EmolSKVIuLDe9rrDqy0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753448209; c=relaxed/simple; bh=FCoHPLyKOMDm+ASkUB3Hj+B1NGk/DKXSVvHxqWpmt+c=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tXgFUgToXlqXdDqdYxs6+PIiWMS9601o9/Ra4+o2bdvGR4bKYA9N4Y7RwOXfehzZXykHrjhagLs457w27JrBU+wP8EqPrYl6mnyjNFfVHVkxsuG7rgvwj0DcWb28OxzqhMD/079+isIoosi93tc/2S0m9rbvnmsaX+yheOsADI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ssMX4XNG; 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="ssMX4XNG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 23471C4CEE7; Fri, 25 Jul 2025 12:56:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1753448208; bh=FCoHPLyKOMDm+ASkUB3Hj+B1NGk/DKXSVvHxqWpmt+c=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ssMX4XNG6sK3qQwNzrwJrDHZtklsWaDoHygJaMYB/Gi17o8A9XoXt7mSLCnRZCmve f0kb+IOG1NhJVYLrLEdR5G298RShSiWLo/TZmLLOXSLQPzw5dR3xK6/UxyTEkBCkSF UHIoITwJVj6P4AdhXmYdug4F4Su3oOD52M4IFMok= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-38376: usb: chipidea: udc: disconnect/reconnect from host when do suspend/resume Date: Fri, 25 Jul 2025 14:55:07 +0200 Message-ID: <2025072504-CVE-2025-38376-e290@gregkh> X-Mailer: git-send-email 2.50.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=3437; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sblR8HwZS+CwWvLjOx2m91uadX1FThzDEN1r+f4+9No=; b=owGbwMvMwCRo6H6F97bub03G02pJDBnNdSuOZYjc7c/mn5wQFjD9xL2irQlb1BerSfL1eTR0P p/ys+58RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzE1YZhQXtZRDdX2EqNMCtr rd3uJhLtT8t/MCxYlWD5If3XYfvw9vR/e368Sz2pMOUPAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: usb: chipidea: udc: disconnect/reconnect from host when do suspend/resume Shawn and John reported a hang issue during system suspend as below: - USB gadget is enabled as Ethernet - There is data transfer over USB Ethernet (scp a big file between host and device) - Device is going in/out suspend (echo mem > /sys/power/state) The root cause is the USB device controller is suspended but the USB bus is still active which caused the USB host continues to transfer data with device and the device continues to queue USB requests (in this case, a delayed TCP ACK packet trigger the issue) after controller is suspended, however the USB controller clock is already gated off. Then if udc driver access registers after that point, the system will hang. The correct way to avoid such issue is to disconnect device from host when the USB bus is not at suspend state. Then the host will receive disconnect event and stop data transfer in time. To continue make USB gadget device work after system resume, this will reconnect device automatically. To make usb wakeup work if USB bus is already at suspend state, this will keep connection for it only when USB device controller has enabled wakeup capability. The Linux kernel CVE team has assigned CVE-2025-38376 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 235ffc17d0146d806f6ad8c094c24ff4878f2edb and fixed in 6.6.97 with commit 937f49be49d6ee696eb5457c21ff89c135c9b5ae Issue introduced in 6.2 with commit 235ffc17d0146d806f6ad8c094c24ff4878f2edb and fixed in 6.12.37 with commit c68a27bbebbdb4e0ccd45d4f0df7111a09ddac24 Issue introduced in 6.2 with commit 235ffc17d0146d806f6ad8c094c24ff4878f2edb and fixed in 6.15.6 with commit 5fd585fedb79bac2af9976b0fa3ffa354f0cc0bb Issue introduced in 6.2 with commit 235ffc17d0146d806f6ad8c094c24ff4878f2edb and fixed in 6.16-rc5 with commit 31a6afbe86e8e9deba9ab53876ec49eafc7fd901 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-2025-38376 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/chipidea/udc.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/937f49be49d6ee696eb5457c21ff89c135c9b5ae https://git.kernel.org/stable/c/c68a27bbebbdb4e0ccd45d4f0df7111a09ddac24 https://git.kernel.org/stable/c/5fd585fedb79bac2af9976b0fa3ffa354f0cc0bb https://git.kernel.org/stable/c/31a6afbe86e8e9deba9ab53876ec49eafc7fd901