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 91E7318B464 for ; Thu, 6 Mar 2025 16:14:30 +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=1741277670; cv=none; b=PyR6D6os+T9BWGLWMXvY7MrjRyVkaiALSUu5rpFsEaD4PebR0Ha2n6hRqYXoo7g7oxZRKHx7qQoIRhjR7mSWe2hqo2LSxl0LnOegI2wSfxwnh34xqebCx1qwIMPptEUAVIbvu6wRdPgsRM4fEvUJHDLieBjfMa4Js74JugJn9ko= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741277670; c=relaxed/simple; bh=DyOaa80dBvV5kt8tCzscbwa3ePXWPfk6EcuRauaC/Sw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=skVT5pLvqwCb2vAKHkce8bNfRHRUtavjm5ALhLJaHnuHfWWFZASbjGcDHKOYiQsuA8+PG640ziThvfAxKh/3OOU4Y1cyq+Cs43bk42YRlLJkjbd7uvxzXSq5adWGrXaTjrPZPBgy7hLvcmSGbjLZ8c/b7RbnIgMxzepL7A33g2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=QL/6gq4L; 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="QL/6gq4L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1C06C4CEE0; Thu, 6 Mar 2025 16:14:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1741277670; bh=DyOaa80dBvV5kt8tCzscbwa3ePXWPfk6EcuRauaC/Sw=; h=From:To:Cc:Subject:Date:Reply-to:From; b=QL/6gq4L/ZCmc/YNmfu2sbELj9TE453Ax9BSAvrrDmZXValJY0d37G7NCfxmDLXAz Le+FmAVnSStInBtryGq6ZtdmPlB5/SZpmcBSfAegHJseUOWWZyau2WHJQG7XOd5+x2 UFy0zBZu6+otAfwMYHbUlRrLIzvAjLzEdKuKdmaY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-58078: misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors Date: Thu, 6 Mar 2025 17:14:11 +0100 Message-ID: <2025030609-CVE-2024-58078-3d63@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=2844; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DyOaa80dBvV5kt8tCzscbwa3ePXWPfk6EcuRauaC/Sw=; b=owGbwMvMwCRo6H6F97bub03G02pJDOknT17c+uXhoq6MXeZXtuTVdb01P6jF+1f1pe+vVf0pa 1u+nKrb1hHLwiDIxCArpsjyZRvP0f0VhxS9DG1Pw8xhZQIZwsDFKQATMa9kmB8xz7x+ip+Yuty0 K0ZPE7PuJS/mDWCYX/Xg3mGdvszufycD74pffuVzdzOHEwA= 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: misc: misc_minor_alloc to use ida for all dynamic/misc dynamic minors misc_minor_alloc was allocating id using ida for minor only in case of MISC_DYNAMIC_MINOR but misc_minor_free was always freeing ids using ida_free causing a mismatch and following warn: > > WARNING: CPU: 0 PID: 159 at lib/idr.c:525 ida_free+0x3e0/0x41f > > ida_free called for id=127 which is not allocated. > > <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ... > > [<60941eb4>] ida_free+0x3e0/0x41f > > [<605ac993>] misc_minor_free+0x3e/0xbc > > [<605acb82>] misc_deregister+0x171/0x1b3 misc_minor_alloc is changed to allocate id from ida for all minors falling in the range of dynamic/ misc dynamic minors The Linux kernel CVE team has assigned CVE-2024-58078 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit ab760791c0cfbb1d7a668f46a135264f56c8f018 and fixed in 6.6.78 with commit 3df72111c39f7e4c5029c9ff720b56ec2e05b764 Issue introduced in 6.2 with commit ab760791c0cfbb1d7a668f46a135264f56c8f018 and fixed in 6.12.14 with commit 8b4120b3e060e137eaa8dc76a1c40401088336e5 Issue introduced in 6.2 with commit ab760791c0cfbb1d7a668f46a135264f56c8f018 and fixed in 6.13.3 with commit 6635332d246d7db89b90e145f2bf937406cecaf0 Issue introduced in 6.2 with commit ab760791c0cfbb1d7a668f46a135264f56c8f018 and fixed in 6.14-rc1 with commit 6d04d2b554b14ae6c428a9c60b6c85f1e5c89f68 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-58078 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/char/misc.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/3df72111c39f7e4c5029c9ff720b56ec2e05b764 https://git.kernel.org/stable/c/8b4120b3e060e137eaa8dc76a1c40401088336e5 https://git.kernel.org/stable/c/6635332d246d7db89b90e145f2bf937406cecaf0 https://git.kernel.org/stable/c/6d04d2b554b14ae6c428a9c60b6c85f1e5c89f68