Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795154534; b=QQiaGhKHqflW1udY1pXoI2Y88WSAagD+uvRhbHwpoZechkrfOlLYgzpe8wL+J4Lu4iNl Y5B0Hey85NIGrYLSnPuKSJxa0tK90OFTe+Le+y/L4EevNk2xlK6+0dj4GqMkQar2TfXLx txxDlI54ZPWDWzuYSsMzoL7visXlUAZppdt6c90ELGNyaaQRJeeTGD92GH5ekxnJaGbnU k9+2RKe80yyoyGbhwIacRkuF48+Zz2MnZvozE9D/p3eiM4qQQF6D+N0r5wGKgX2F7jPNn UbileRmoXoHu4M4DSsgfJYlIPiAv+s6ihIXW4ziLP1f1282Ad8CPhwuyKzCUq3eMaNQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795154534; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: Reply-To:MIME-Version:Lines:X-Developer-Signature:X-Developer-Key: Content-Transfer-Encoding; bh=2613HPgNeNPsF638/YfsVS3ZlVqEGUSQ7TIa0MD9nvs=; b=hCGKCqCHQcjvhv0ePNAIfm8A4Q34EWHZXL15i48C3UMUfVe5FoSO0mQPvFoFL1z4reoL NdiR0iESRWbf4lyxPoxfUYUhVHWbsPz5swhXtCQG9g+kM9ol3ga0klbS2sX1mZRtJBsui E7iyyHrXhjlDyGwUyBkTYxS7dgSJGyUHXJGNi2rSrf886xzabsRFzF3k41pK/kTF3CK5u PmO0amFwHlIIaOMfysU8oBKzszuKrJmxRZ1FPpRcchLRQbah51lLgcsi7O1f67oa5cEK1 S6dxHaM7g6J7c45NG1toCCo2WmHSXkeBJ6aKBMAKGIjVppc8Za+aT2SI4qEkt9Gapng== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=utkbWNGL; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AB145606A51C for ; Fri, 20 Nov 2026 06:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=utkbWNGL Received: by smtp.kernel.org (Postfix) with ESMTPSA id 084581F000C6; Fri, 20 Nov 2026 06:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795154534; bh=2613HPgNeNPsF638/YfsVS3ZlVqEGUSQ7TIa0MD9nvs=; h=From:To:Cc:Subject:Date:Reply-To; b=utkbWNGL3zQgUcscwyH7H8M8Wh8zsSrWmsrN9ZJMXblsSTPolQtGAIQMSeqtGLwzk Y6CF/SSqBMAKxVSrHAxwj6fpYr50Z2l86t469Cc+5CrrtFEGtu55X3b0XfUEr62oCQ GKjXTJAB6vLvtxzneiy8uNKY0ssElNSJaUTTkb2c= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99777: net/9p/usbg: remove bogus context initialization in alloc_requests Date: Fri, 20 Nov 2026 06:52:43 +0100 Message-ID: <2026112030-CVE-2026-99777-8ebe@gregkh> X-Mailer: git-send-email 2.56.1 Reply-To: , X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3807; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dbdlPMR0C9cu/8NhRPOcPrX7OnIZB5HZdYy+dE+8jos=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/7y+7f2LJnX1fr2bdDdFbEPzSxc5zR5L46yWMx2cu8 +cUT1oa1BHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATUZ/IMD/fZNd39/9MXWrq r/J3//fR6zA8W8qwYIUVm1h3rRXHfJ1LVhJOSq+Xlr1TAgA= 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: net/9p/usbg: remove bogus context initialization in alloc_requests alloc_requests() initializes usb9pfs->in_req->context to point at the struct f_usb9pfs instance itself. usb9pfs_queue_tx() later overwrites this with the real struct p9_req_t pointer before every transmit, and usb9pfs_tx_complete() clears it back to NULL after each completion, so in_req->context only ever holds a valid p9_req_t once a request has actually been queued. usb9pfs_clear_tx(), however, can run at any time (mount close, gadget disable) independent of whether a request was ever queued. If it runs before the first usb9pfs_transmit(), it reads the leftover sentinel value, type-confuses the struct f_usb9pfs pointer as a struct p9_req_t, and both writes through it (req->t_err = -ECONNRESET) and hands it to p9_client_cb(), which manipulates req->wq and req->refcount at bogus offsets inside f_usb9pfs. This reliably corrupts memory or panics whenever the transport is torn down before any 9p request has been transmitted, e.g. mounting and immediately unmounting, or a cable disconnect racing the very first request. usb9pfs->out_req->context is set the same way but is never read by this transport (usb9pfs_rx_complete() identifies the instance via ep->driver_data instead), so it serves no purpose either. Both endpoints' ->driver_data are already set to usb9pfs in enable_endpoint(), which is what the completion handlers actually use to recover the f_usb9pfs instance. Just drop the leftover ->context assignments; usb_ep_alloc_request()/alloc_ep_req() already return zeroed requests, so in_req->context correctly starts out NULL. The Linux kernel CVE team has assigned CVE-2026-99777 to this issue. Affected and fixed versions =========================== Issue introduced in 6.12 with commit a3be076dc174d9022a71a12554feb4c97b5c4d5c and fixed in 6.12.118 with commit 3bd662cdf7d18d12be2c6010fe4049b02763d8ec Issue introduced in 6.12 with commit a3be076dc174d9022a71a12554feb4c97b5c4d5c and fixed in 6.18.64 with commit 591939db7cff9ca80a5a5deb2e3371b731817ac4 Issue introduced in 6.12 with commit a3be076dc174d9022a71a12554feb4c97b5c4d5c and fixed in 7.3.5 with commit b3d262be54f5cfc5f75f7271e94d64a6315cd2f1 Issue introduced in 6.12 with commit a3be076dc174d9022a71a12554feb4c97b5c4d5c and fixed in 7.4-rc2 with commit bbdb38b2e543ffa72dca5450f2535cf998ef1cdd 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-2026-99777 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: net/9p/trans_usbg.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/3bd662cdf7d18d12be2c6010fe4049b02763d8ec https://git.kernel.org/stable/c/591939db7cff9ca80a5a5deb2e3371b731817ac4 https://git.kernel.org/stable/c/b3d262be54f5cfc5f75f7271e94d64a6315cd2f1 https://git.kernel.org/stable/c/bbdb38b2e543ffa72dca5450f2535cf998ef1cdd