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 AE8B6215F42 for ; Thu, 8 May 2025 06:39:54 +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=1746686394; cv=none; b=e73eLjlJid0COdsG7iT0vpWznDDVir9NtLT7KfS6W12eeR8McddOlDsHZBlgOhDXx/m+7yVIV6lWj8wvhuw0I5aVTOchzk2BQjus2CqElCyh6ygCE4OiJZVWsMkT1UwdrSXHOrFnGVqmqxbhZOFUV5W/0Bxfie5R1BfAUVPR+UE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746686394; c=relaxed/simple; bh=fcmmqKuykqBAwxtOfGcAQd6phbfAjZnlCbDbSrSt+Z4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eBRTZ42jILVJJi7kHRLNO0kvGJSAxrhN0upjaOihRlHEPiNyyCMsexvwdRuZ+9HWqRDm5PBDTJph4vxLQHimmYNciXAzdJ0pNi/X+51/8l+ocNpfuzkBT28USGOQCpuQV0OPGXEaPTQpFtRAwvMI4t099t9Ij5Ju/C9/050/8+o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=KeRnsF1p; 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="KeRnsF1p" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 353E4C4CEEE; Thu, 8 May 2025 06:39:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1746686394; bh=fcmmqKuykqBAwxtOfGcAQd6phbfAjZnlCbDbSrSt+Z4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=KeRnsF1p89Sl6j/7PCfXenW7p3uHychumzxFDHGv/lFMxS02ewvjoDFKKvV3u1skR xP7BtrUgPs6N92Fo9cmdqQqq0lQAJQWt7FFBmPt5VYSZ7+GGbkfWAIe8hKgNp7NtJd Lbxwkej9I7yWtERyOP0gxbGxFCouJbFgHc/yAYPM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-37813: usb: xhci: Fix invalid pointer dereference in Etron workaround Date: Thu, 8 May 2025 08:39:22 +0200 Message-ID: <2025050817-CVE-2025-37813-8f2b@gregkh> X-Mailer: git-send-email 2.49.0 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=3058; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=luz8g2crJBNhsN2KdcGcovGHOHD5IXZz7V6S3sbi2f8=; b=owGbwMvMwCRo6H6F97bub03G02pJDBkygdNO7Vu+eMXXao6Ue8XGV/7vEymxvSLu/Hi2yuJrX 5YfiTN81hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATeVLCsOBElFfCgprSRx8M Ztzmezkj4S6TzGOGeTpLFzCcNSh1CDm7tP+2pkXLhTulzAA= 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: xhci: Fix invalid pointer dereference in Etron workaround This check is performed before prepare_transfer() and prepare_ring(), so enqueue can already point at the final link TRB of a segment. And indeed it will, some 0.4% of times this code is called. Then enqueue + 1 is an invalid pointer. It will crash the kernel right away or load some junk which may look like a link TRB and cause the real link TRB to be replaced with a NOOP. This wouldn't end well. Use a functionally equivalent test which doesn't dereference the pointer and always gives correct result. Something has crashed my machine twice in recent days while playing with an Etron HC, and a control transfer stress test ran for confirmation has just crashed it again. The same test passes with this patch applied. The Linux kernel CVE team has assigned CVE-2025-37813 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.66 with commit fbc0a0c7718a6cb1dc5e0811a4f88a2b1deedfa1 and fixed in 6.6.89 with commit 142273a49f2c315eabdbdf5a71c15e479b75ca91 Issue introduced in 6.12.2 with commit 9258c9ed32294ce3a4b58c9d92fc49ba030d35c9 and fixed in 6.12.26 with commit bce3055b08e303e28a8751f6073066f5c33a0744 Issue introduced in 6.13 with commit 5e1c67abc9301d05130b7e267c204e7005503b33 and fixed in 6.14.5 with commit 0624e29c595b05e7a0e6d1c368f0a05799928e30 Issue introduced in 6.13 with commit 5e1c67abc9301d05130b7e267c204e7005503b33 and fixed in 6.15-rc4 with commit 1ea050da5562af9b930d17cbbe9632d30f5df43a Issue introduced in 6.11.11 with commit 4725344ca645a98a9d8e45e25b01a2244de5b8aa 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-37813 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-ring.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/142273a49f2c315eabdbdf5a71c15e479b75ca91 https://git.kernel.org/stable/c/bce3055b08e303e28a8751f6073066f5c33a0744 https://git.kernel.org/stable/c/0624e29c595b05e7a0e6d1c368f0a05799928e30 https://git.kernel.org/stable/c/1ea050da5562af9b930d17cbbe9632d30f5df43a