Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 60C715921EC for ; Fri, 11 Sep 2026 20:05:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789157163; cv=none; b=R++9tlfNs1s3lyL43rlborZPAcNDccUepXSvo77Sk4umElby8cLd8+BFi1H7kTZl+pJm4JrSNrJ5xBKmbYnRT0GNKZtV5fNbcwcbHiTxflgUJRKIMv89QPCT11cwaKdrqHXzaFDvlI9b0Eo3Cf2bvATbeZxCo71I8k6orcsBi1A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789157163; c=relaxed/simple; bh=lquEzgWNTSk12UARNatCb17jhXjOnmHpo6+niOpw9wc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ewirMl/HUAISG9sjIBo8KZh8h4qKkzMHhnc+3I7T8XTAdA1jVTYkqGFuRm8rD65tnmKqmFzxEsJBTHRqAqWdCBGYvghbEqQfpfEciCSsXuJejLCtLk7lnZCbk1D4V67+YwRwFlKhmSW2CK2AlIs+yzapP4oblBN7Rnk4DE2kofA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=B+QOOnM6; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="B+QOOnM6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75A5E1F00893; Fri, 11 Sep 2026 20:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789157158; bh=FNU13L0hfPR0oSehdgbvWevuOdkwl07SzMu0LlYj9Gg=; h=From:To:Cc:Subject:Date:Reply-To; b=B+QOOnM6/ODEtn4WXnxa8bQf8pIMeldKTYJFfbxxKI3f5u75ftlzIQ/yxzcyTbCJN S5FWYcKuL8BOgyVJwulpDXbfQ44IZwlI9bR3eKjNTlFzLDVmGmlxgUKWFDxdowYi/8 BjK0jeBEOxRR03xE86d20WQtKlbXNb7Y74KQhTNc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-89738: usb: gadget: at91_udc: drain polled-VBUS timer/work before udc is freed Date: Fri, 11 Sep 2026 21:47:07 +0200 Message-ID: <2026091104-CVE-2026-89738-f644@gregkh> X-Mailer: git-send-email 2.55.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3646; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=FuHSjLKd1K7BUEXasyYxK1mcd72dmp4dZsHYmq/BMrU=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlLIntWrV1mcHuXXejq7b2BHz/V8qj+f/bBL/3NKg21W w6f0mz8OmJZGASZGGTFFFm+bOM5ur/ikKKXoe1pmDmsTCBDGLg4BWAiPhoMCzYnnVqzwZxXvZKv 0XRl8MW1bfftwxgWNEv2eDMyJAhqcmre21yRHX/bfEotAA== 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: at91_udc: drain polled-VBUS timer/work before udc is freed In polled-VBUS mode (board.vbus_pin && board.vbus_polled), probe arms a self-restarting cycle: at91_vbus_timer() schedules vbus_timer_work, and at91_vbus_timer_work() calls at91_vbus_update() and re-arms the timer via mod_timer(). Both recover the same udc through container_of and dereference it on every iteration. Neither teardown path cancels this cycle. udc is devm-allocated, so it is freed after at91udc_remove() returns, and is likewise freed when probe fails and devres runs. A timer callback or work item that is pending or running at either point dereferences the freed udc. Add at91_udc_shutdown_vbus_timer() and call it from at91udc_remove() and from the usb_add_gadget_udc() failure path in probe; the remaining probe error paths fail before the timer is armed. timer_shutdown_sync() waits for a running callback and clears timer->function, which makes the work handler's mod_timer() a permanent no-op; cancel_work_sync() then drains any pending or running work whose re-arm attempt now does nothing. The timer must be shut down first, since cancelling the work alone would let the timer re-queue it. The guard mirrors probe: in IRQ mode the timer and work_struct are never initialized. This does not require a fault; a normal driver unbind can interleave with an already queued work item. This issue was found by an in-house static analysis tool. The Linux kernel CVE team has assigned CVE-2026-89738 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.36 with commit 4037242c4f5ff77afe61bf07ca1e8a99490219e5 and fixed in 6.12.109 with commit a2a602cb1e28d76a5398cec3fa21b0110385f501 Issue introduced in 2.6.36 with commit 4037242c4f5ff77afe61bf07ca1e8a99490219e5 and fixed in 6.18.50 with commit 51a311eb97e91ce1aed3005cb71ccb2e30f8cce8 Issue introduced in 2.6.36 with commit 4037242c4f5ff77afe61bf07ca1e8a99490219e5 and fixed in 7.2.4 with commit 557ef547d49ff5e6026a4d39bdd3113bd81d7688 Issue introduced in 2.6.36 with commit 4037242c4f5ff77afe61bf07ca1e8a99490219e5 and fixed in 7.3-rc1 with commit c27d13ce4bab80fbdf6523928071b6c24b37606c 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-89738 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/udc/at91_udc.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/a2a602cb1e28d76a5398cec3fa21b0110385f501 https://git.kernel.org/stable/c/51a311eb97e91ce1aed3005cb71ccb2e30f8cce8 https://git.kernel.org/stable/c/557ef547d49ff5e6026a4d39bdd3113bd81d7688 https://git.kernel.org/stable/c/c27d13ce4bab80fbdf6523928071b6c24b37606c