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 DB59520FA97 for ; Thu, 6 Mar 2025 15:55:10 +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=1741276511; cv=none; b=IZnFrIRiS56vIo3HsHORmD8/FvqXltrGbo/6y/uvz9cpP3l7nW+yt3eqFGIeYCRTl5GguU0DfAD4igpeUlAquoAwg2bqeLNsFP45P6/X7/CQZhMBC6/bWKuBTQDKRJCwO4NrZ4Cne4/sCsJFseDK0SWcqLuzPY2knrBkRzrWAEI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741276511; c=relaxed/simple; bh=cl142TgKt2MndHMO1e8JX68bS3WbvvVrTfB3CCWc9ck=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=KHi1TmLtjC23AiGiOqFJKXUmFGUKpZrOoVBGv92ah7wX/D+opy+AkOWAfKYGtz6Gu0tZXEFHG+wNPO0q83S6AWgdOoEu+zs7swsKkEy39dgWTlm7xhy4ti5TtnlWCPLQutUJIFw55zQxJRcoPoVuKdb1Msm9R7oaIlz2garqzBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ncO4sI4r; 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="ncO4sI4r" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3ECCC4CEE0; Thu, 6 Mar 2025 15:55:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741276510; bh=cl142TgKt2MndHMO1e8JX68bS3WbvvVrTfB3CCWc9ck=; h=From:To:Cc:Subject:Date:Reply-to:From; b=ncO4sI4r3/mAaT7f1n66sgyZwXNPiS3nwGSgrqReL9JSmNC8ohT4JbaYcqWq4h2cG +/zywRbz3AmSFVwBnmkN/tVLUXPYc4AONpfiVj2XlpuP7+eBBLu5QiZ+WLR0jszGHG 71S4WmJsghUpzgo1K6HXQXC6lCRZDsbVFX/lDeL8= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58055: usb: gadget: f_tcm: Don't free command immediately Date: Thu, 6 Mar 2025 16:54:08 +0100 Message-ID: <2025030606-CVE-2024-58055-39b6@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=2608; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=cl142TgKt2MndHMO1e8JX68bS3WbvvVrTfB3CCWc9ck=; b=owGbwMvMwCRo6H6F97bub03G02pJDOknj8pte1C1xkypsqp+se7uy00VYSGfvVZaKN90Civ7s MfLYLpYRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykJJNhwYxwVlYHg8ers0Or vpvrhf2a9IJpFsP8+FvRRvM1k69tPxoYs6z1J/eE68d9AQ== 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_tcm: Don't free command immediately Don't prematurely free the command. Wait for the status completion of the sense status. It can be freed then. Otherwise we will double-free the command. The Linux kernel CVE team has assigned CVE-2024-58055 to this issue. Affected and fixed versions =========================== Issue introduced in 4.6 with commit cff834c16d23d614388aab1b86d19eb67b3f80c4 and fixed in 6.1.129 with commit f0c33e7d387ccbb6870e73a43c558fefede06614 Issue introduced in 4.6 with commit cff834c16d23d614388aab1b86d19eb67b3f80c4 and fixed in 6.6.76 with commit 16907219ad6763f401700e1b57b2da4f3e07f047 Issue introduced in 4.6 with commit cff834c16d23d614388aab1b86d19eb67b3f80c4 and fixed in 6.12.13 with commit 929b69810eec132b284ffd19047a85d961df9e4d Issue introduced in 4.6 with commit cff834c16d23d614388aab1b86d19eb67b3f80c4 and fixed in 6.13.2 with commit e6693595bd1b55af62d057a4136a89d5c2ddf0e9 Issue introduced in 4.6 with commit cff834c16d23d614388aab1b86d19eb67b3f80c4 and fixed in 6.14-rc1 with commit c225d006a31949d673e646d585d9569bc28feeb9 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-2024-58055 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_tcm.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/f0c33e7d387ccbb6870e73a43c558fefede06614 https://git.kernel.org/stable/c/16907219ad6763f401700e1b57b2da4f3e07f047 https://git.kernel.org/stable/c/929b69810eec132b284ffd19047a85d961df9e4d https://git.kernel.org/stable/c/e6693595bd1b55af62d057a4136a89d5c2ddf0e9 https://git.kernel.org/stable/c/c225d006a31949d673e646d585d9569bc28feeb9