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 B4EF833B6C9 for ; Thu, 30 Oct 2025 09:49:14 +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=1761817754; cv=none; b=ZGFTY9WVflUEEDXmB5NelnZA7K8nhPxD4Lfjc1wX3IVpBNQkjFPnxP5YJzEH/3HAajUnh/u+psV685Rp5ycQB63iObGeUikv/MaIn6+E3ORMxBvT6taXIGCYbyKOC1dQ9ks0RV8J159/sHoOki/nBnXQ/oY7h/DOY8CcviXQEjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761817754; c=relaxed/simple; bh=sG2Hrzx7l1kw0RWBIE8Uo/zyPgDZ/pf692e13SXZ1AU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=l/gxH2SeqJQa0vM4QdU2KhDP2rhVqKzmSCE7KGGXhe0F6B3gesbTkeXXPzinEpspRPO8YvFjVHc290z3+jyVNO6QGz4l8NbW8sMC9YD/s/O8JeLLqsMNV/Kw//1Kwn28AUYWmCJUgdDjhjKUwehMcOdmJuL3Wq7MrLLdu/O8ZcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YmE4OzoE; 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="YmE4OzoE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E614BC4CEF1; Thu, 30 Oct 2025 09:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1761817754; bh=sG2Hrzx7l1kw0RWBIE8Uo/zyPgDZ/pf692e13SXZ1AU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=YmE4OzoERF2uR73h1eHNshqPYHO1BhvOL+Fxw/zUZLTVNAHsUod9DNerrOWyHlCp1 KrCE/B/uXQvnqutsiq4msepnBDup6xT/6xQ58Jta+3kAVha3+4RO9ID25gybu3k8TW mFBBi+FG39vEanZ0RJTJVR8d1o9fSzUb+kpYzrIw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-40093: usb: gadget: f_ecm: Refactor bind path to use __free() Date: Thu, 30 Oct 2025 10:48:20 +0100 Message-ID: <2025103016-CVE-2025-40093-f52d@gregkh> X-Mailer: git-send-email 2.51.2 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=2802; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nMPdsYkv776fWwNEHX0QAFn/mUVtaKvaOS+bJ+4wQgA=; b=owGbwMvMwCRo6H6F97bub03G02pJDJnMJgmrOCeUZe3XYWowUsopc85dX8F8tOMDu9F+HRPb1 U98T6V1xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwES0Cxnm17JVSO0Oejql5slN wU3X3mh96El9wjBP/8ECa7OANwuCDZ/lJG3YYpb5VzIaAA== 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: f_ecm: Refactor bind path to use __free() After an bind/unbind cycle, the ecm->notify_req is left stale. If a subsequent bind fails, the unified error label attempts to free this stale request, leading to a NULL pointer dereference when accessing ep->ops->free_request. Refactor the error handling in the bind path to use the __free() automatic cleanup mechanism. The Linux kernel CVE team has assigned CVE-2025-40093 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.27 with commit da741b8c56d612b5dd26ffa31341911a5fea23ee and fixed in 6.1.158 with commit d3745aaef19198d0c81637a7dd50ef53c4f879b7 Issue introduced in 2.6.27 with commit da741b8c56d612b5dd26ffa31341911a5fea23ee and fixed in 6.6.114 with commit 070f341d86cf2c098d63e484a86c7c1d2696a868 Issue introduced in 2.6.27 with commit da741b8c56d612b5dd26ffa31341911a5fea23ee and fixed in 6.12.55 with commit 15b9faf53ba8719700596e7ef78879ce200e8c2e Issue introduced in 2.6.27 with commit da741b8c56d612b5dd26ffa31341911a5fea23ee and fixed in 6.17.5 with commit 4630c68bade82f087eaaab22e9a361da2f18d139 Issue introduced in 2.6.27 with commit da741b8c56d612b5dd26ffa31341911a5fea23ee and fixed in 6.18-rc1 with commit 42988380ac67c76bb9dff8f77d7ef3eefd50b7b5 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-40093 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/function/f_ecm.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/d3745aaef19198d0c81637a7dd50ef53c4f879b7 https://git.kernel.org/stable/c/070f341d86cf2c098d63e484a86c7c1d2696a868 https://git.kernel.org/stable/c/15b9faf53ba8719700596e7ef78879ce200e8c2e https://git.kernel.org/stable/c/4630c68bade82f087eaaab22e9a361da2f18d139 https://git.kernel.org/stable/c/42988380ac67c76bb9dff8f77d7ef3eefd50b7b5