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=1795099822; b=BjaTYtkY/SKNV2N2b9XBagiyz8fEz2dLtK28KsCxfKiOsiGXWaveK7vey8q599W3Z0XB z7qZ7s/OQyht8dQl9EIPEG2bSszR3l0yy2XKIuehDHr6tq1UX1pqqwCgb/utBWfbThmgY SvL0ODfY1rjHsk7jOOY2aZSI6Rqs3FX/dBbHoIl46RCDNanTfGRkjJa2EZo7+p0bsnIXg PVwhLbIx3H8JoeXrLt1BqrRBoJYSDmbimv64OBUtTbAnQ6MOA/zvKM9uqQU//H90n3u4F huaNT1LdIkO/bndtsNlYfUdwGmGjiUkqosMMW53vK6WpllUzn/5OODTPhLT1wYUKxVA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795099822; 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=GA6vJBFrjraC728HGJaj2KFfVBxAiKgLrMLstoA6pPI=; b=TwopazxRwXQR9qTDh/jiyLLasfVi2P2fMd02Qq0zeo2FyTMxPeiIWPrt8LzZJCoed/sC GJr/PGtsGfF7MEHKM7IouDrizsyOhpNhnGlQeswA9M1GM8EkDNzcVrDSqKcJYu7A86E4j PyOo/gXm4azQ/JDfbNE8MChYE4yOaYl53OENFNwK3BAOu78EvhXg50tu91S0FmfoVx9Uq xbySJqSXsv8LiiijeRYzLjwDFHeGrKCT/Mfx0tAeAUZ8bHvPZJZArymN1fC2dUeud2Mz0 52xOL7vC/+wrGgRRDnqttYYV6O1rpuoFZ3dUyKingxtkjbb5tntoeVP5ETyp9/rD8og== 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=n8uvzfCx; 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 58DA4606B066 for ; Thu, 19 Nov 2026 14:50:22 +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=n8uvzfCx Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1AF9C1F000C5; Thu, 19 Nov 2026 14:50:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795099822; bh=GA6vJBFrjraC728HGJaj2KFfVBxAiKgLrMLstoA6pPI=; h=From:To:Cc:Subject:Date:Reply-To; b=n8uvzfCxQsvmQv29IShkuKtX36R0C0tgs69WFiTZPmPCfkzTMH/w6Z21xkKikIQDG 8fG5O+eXKpa4phyXAcge3jNRXtlmnn38uU0ifdOsJxEbC6Pvf1K38SaqCmzEqEfEEu z+dN8XzEuENW2msVHV4Xgk4QPlc7TtjEUnZap6mY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-99449: usb: gadget: fix refcount underflow in gadgetfs_bind() error path Date: Thu, 19 Nov 2026 15:25:47 +0100 Message-ID: <2026111906-CVE-2026-99449-cff3@gregkh> X-Mailer: git-send-email 2.56.0 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=2636; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=sZQYBmsaPuEOpP+StJ7WzSkjfFaeI20E/GnITrg2KlA=; b=owGbwMvMwCRo6H6F97bub03G02pJDFn/2drybvheCOraZbpyl/KPozZvi+yEXS90tMR2nbucd qh/yqaujlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIzpMM82uV9+Sd77zV/3G/ hIzag9UK2oKBrgwLtp/+Lnz/TkSHTcyR7SK63dOnrPW/CQA= 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: gadget: fix refcount underflow in gadgetfs_bind() error path gadgetfs_bind() calls get_dev() only on the success path, but gadgetfs_unbind() called from the enomem error label unconditionally calls put_dev(). When bind fails (e.g. ENOMEM), put_dev() fires without a matching get_dev(), leaving the refcount unbalanced. A subsequent close of the ep0 file descriptor calls dev_release() -> put_dev() which hits zero and frees the object; then gadgetfs_kill_sb() calls put_dev(the_device) again on the already-freed pointer, triggering a refcount underflow and use-after-free. Fix by calling get_dev() at the start of gadgetfs_bind(), before any error path that invokes gadgetfs_unbind(), so the reference is always balanced regardless of whether bind succeeds or fails. The Linux kernel CVE team has assigned CVE-2026-99449 to this issue. Affected and fixed versions =========================== Fixed in 6.12.117 with commit a28791bdb256abd0f338a9b32a95392907d1c987 Fixed in 6.18.61 with commit e7e89759445e97ccb445758c6c8d5caed4eb42f9 Fixed in 7.3.2 with commit adb693d0369cd7f08f9424588fdd1f613c22d43b Fixed in 7.4-rc1 with commit cb3b441f2698455a48e9a023d5f7f4e3fcb94c73 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-99449 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/gadget/legacy/inode.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/a28791bdb256abd0f338a9b32a95392907d1c987 https://git.kernel.org/stable/c/e7e89759445e97ccb445758c6c8d5caed4eb42f9 https://git.kernel.org/stable/c/adb693d0369cd7f08f9424588fdd1f613c22d43b https://git.kernel.org/stable/c/cb3b441f2698455a48e9a023d5f7f4e3fcb94c73