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 61FCD182BD for ; Tue, 2 Apr 2024 06:22:47 +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=1712038967; cv=none; b=E13QJW168F3FTWtPz3Cf9P5+N+ynqSAS6sFTBwivj4VKjt5vJrv5NwjZWh3Wg5K8H+v8AdV/UYDf2/J8caKaDSJCQLYPlyrpbBuafYivtD6adaqIbaQPyiCrHHmySLMK8wy/kxDdmOrv7Jmkk+a29iQ0TJJ+uOZeAJtlVyZWxm4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712038967; c=relaxed/simple; bh=adsKCf22PctBtn5ZIKLk77rr62LfllD3IponG90J4FM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=XTK0SPJHeCYBdHN7tFlQoBLyBznLHjCjDoVKB8x9d+s9XB8eB1XDYKK1A0TAffB/MJn9gWzuzwJjzMa4mN8WRlxVC69oTMUmEn8Vx8fYgKjEumgZBtn1TmJYMppXmwN1pSBTgVbO+mejP7YUZpQ9KN3TxFUV/clSvkK84Zxbgjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=PvHIB54Q; 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="PvHIB54Q" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C82B8C433F1; Tue, 2 Apr 2024 06:22:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712038967; bh=adsKCf22PctBtn5ZIKLk77rr62LfllD3IponG90J4FM=; h=From:To:Cc:Subject:Date:Reply-to:From; b=PvHIB54QAUQsJ20I8MUT4du+kYBLCUfKJqBLEZ6wdroOBAzKj9C/TEww66rWd7DLx 8AqsQwfe0LCqYvBkdQReQ0H3PVg9c8HPvZU2WKPhU0aGdIJTnfjTOdrueArNCOduCS HPNIyRJ5eQeklzeLd7Y99mYmaLbQAFHUicCgYxac= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26659: xhci: handle isoc Babble and Buffer Overrun events properly Date: Tue, 2 Apr 2024 08:22:23 +0200 Message-ID: <2024040222-CVE-2024-26659-e4f6@gregkh> X-Mailer: git-send-email 2.44.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=2859; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=adsKCf22PctBtn5ZIKLk77rr62LfllD3IponG90J4FM=; b=owGbwMvMwCRo6H6F97bub03G02pJDGncS+SOpuo+uSBnfGG1+AFub/EuLm/tH5uCN1gJyiwqP 3hRyWJ/RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEzk4yeGecpqLgZv3jG7sAW/ LJJLez91VlCLO8NcyRj1kz9fawV9PGEx3fDl1qeh3y49AgA= 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: xhci: handle isoc Babble and Buffer Overrun events properly xHCI 4.9 explicitly forbids assuming that the xHC has released its ownership of a multi-TRB TD when it reports an error on one of the early TRBs. Yet the driver makes such assumption and releases the TD, allowing the remaining TRBs to be freed or overwritten by new TDs. The xHC should also report completion of the final TRB due to its IOC flag being set by us, regardless of prior errors. This event cannot be recognized if the TD has already been freed earlier, resulting in "Transfer event TRB DMA ptr not part of current TD" error message. Fix this by reusing the logic for processing isoc Transaction Errors. This also handles hosts which fail to report the final completion. Fix transfer length reporting on Babble errors. They may be caused by device malfunction, no guarantee that the buffer has been filled. The Linux kernel CVE team has assigned CVE-2024-26659 to this issue. Affected and fixed versions =========================== Fixed in 5.10.213 with commit 696e4112e5c1 Fixed in 5.15.152 with commit 2aa7bcfdbb46 Fixed in 6.1.82 with commit 2e3ec80ea7ba Fixed in 6.6.17 with commit f5e7ffa9269a Fixed in 6.7.5 with commit 418456c0ce56 Fixed in 6.8 with commit 7c4650ded49e 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-26659 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/696e4112e5c1ee61996198f0ebb6ca3fab55166e https://git.kernel.org/stable/c/2aa7bcfdbb46241c701811bbc0d64d7884e3346c https://git.kernel.org/stable/c/2e3ec80ea7ba58bbb210e83b5a0afefee7c171d3 https://git.kernel.org/stable/c/f5e7ffa9269a448a720e21f1ed1384d118298c97 https://git.kernel.org/stable/c/418456c0ce56209610523f21734c5612ee634134 https://git.kernel.org/stable/c/7c4650ded49e5b88929ecbbb631efb8b0838e811