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 BE1D123AE7E for ; Wed, 12 Mar 2025 09:42:53 +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=1741772573; cv=none; b=Fc/ckJ88XT5UnAIF+pLTVz0jVPCIjjHgwT+lvOVNBGZZk0NHQQqttE88sJjQgHqBVsfDFZ7CNiueFUIa0Lj7GBNh0s6P461yrVwOduO8Sksr//hLUvPWdJaKfbmDMbNH5LLkmeChCD9Dm1sldoW/r3usCP8fjyJeON3ayjxWRQs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741772573; c=relaxed/simple; bh=tJafB1zmRvfj74jmsK3LaEBFTWi9GF7a4OS9BlLg4tk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=gbDZ8o3SrKRdfXK2gfx7izBg30rWHur6idp3DyLHVEIy1Ot1l0HzD9hcygDLuQzuSiSSWxluYGNKGMPdoi+aP8C52J31KDhDsNnuLsSUFlDWw0j7+D6Yzxu36O9AsfNopY/yXcCxzBQR/2k0TlSK3uR7m+HC1OlDtSwcAhB6ehw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=vMaqV75M; 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="vMaqV75M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 457F8C4CEEC; Wed, 12 Mar 2025 09:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741772573; bh=tJafB1zmRvfj74jmsK3LaEBFTWi9GF7a4OS9BlLg4tk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=vMaqV75MJqrHGa8DFEQ59F5YuFlR0vCWxt24rzaohxAhP12QuiIKeXQjSrVvaZrgW RiP3kyrfk7z6fmViJazw6Ji4MYpnNQHZ156dTHvZooZapJdRfqzpptQjFk8fTU0VKp RtQGePUy3NuG3kkW6GuvmNy6QqMs8wJfE73xx9HI= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2025-21859: USB: gadget: f_midi: f_midi_complete to call queue_work Date: Wed, 12 Mar 2025 10:42:25 +0100 Message-ID: <2025031216-CVE-2025-21859-514d@gregkh> X-Mailer: git-send-email 2.48.1 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=2721; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=tJafB1zmRvfj74jmsK3LaEBFTWi9GF7a4OS9BlLg4tk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkXw378LClisj87T/ylknKW56KrbC7JOpKPOH7sty/mm OXzVPtjRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEZCPDgv3fj037wPRp5X3h mzOdr2QuNZ5T+45hwdk78X2K09mOLndY/tDc8szJ/HMt/gA= 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: USB: gadget: f_midi: f_midi_complete to call queue_work When using USB MIDI, a lock is attempted to be acquired twice through a re-entrant call to f_midi_transmit, causing a deadlock. Fix it by using queue_work() to schedule the inner f_midi_transmit() via a high priority work queue from the completion handler. The Linux kernel CVE team has assigned CVE-2025-21859 to this issue. Affected and fixed versions =========================== Issue introduced in 3.2 with commit d5daf49b58661ec4af7a55b277176efbf945ca05 and fixed in 6.1.130 with commit 24a942610ee9bafb2692a456ae850c5b2e409b05 Issue introduced in 3.2 with commit d5daf49b58661ec4af7a55b277176efbf945ca05 and fixed in 6.6.80 with commit deeee3adb2c01eedab32c3b4519337689ad02e8a Issue introduced in 3.2 with commit d5daf49b58661ec4af7a55b277176efbf945ca05 and fixed in 6.12.17 with commit e9fec6f42c45db2f62dc373fb1a10d2488c04e79 Issue introduced in 3.2 with commit d5daf49b58661ec4af7a55b277176efbf945ca05 and fixed in 6.13.5 with commit 8aa6b4be1f4efccbfc533e6ec8841d26e4fa8dba Issue introduced in 3.2 with commit d5daf49b58661ec4af7a55b277176efbf945ca05 and fixed in 6.14-rc3 with commit 4ab37fcb42832cdd3e9d5e50653285ca84d6686f 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-21859 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_midi.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/24a942610ee9bafb2692a456ae850c5b2e409b05 https://git.kernel.org/stable/c/deeee3adb2c01eedab32c3b4519337689ad02e8a https://git.kernel.org/stable/c/e9fec6f42c45db2f62dc373fb1a10d2488c04e79 https://git.kernel.org/stable/c/8aa6b4be1f4efccbfc533e6ec8841d26e4fa8dba https://git.kernel.org/stable/c/4ab37fcb42832cdd3e9d5e50653285ca84d6686f