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 8DFF51E98FD for ; Wed, 15 Jan 2025 13:06:51 +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=1736946411; cv=none; b=IDxJq/u34XLHYYXuHn46o9dp1SW5P3+w7SZYo7hCVF0CR3KJJdVMROYmR3jjSS/JMhczGUynMYFo5q+qfIWeiGB1OeUIz8WFetq8axBEN+4DXTq4TTFQpc41xTiFDwLIMODdVYZzZZJGDGPqklsyrJSGHV1hBGXXdoV/H97YDng= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736946411; c=relaxed/simple; bh=dgjk/3S/DAz4uyfnpMfRSC5IFbRVm63gI3LIWgImGag=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cSPuFzwhdd1AJ+S/M3LkWPKcKaZ5/XtduuLbiIdEJaIqGJkc1kre99U5MFZixX4Ef0fihcdWauPChm3L2jmMSKOyjzQLWJ9Kg9ov5kctjGsav03QPX++4J1ZCRkM5QdznE6wTd6lmRnkyEj0MiYHLj80FOWbjT5jZP1qh17KETA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=00ljRimt; 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="00ljRimt" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A6378C4CEDF; Wed, 15 Jan 2025 13:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1736946411; bh=dgjk/3S/DAz4uyfnpMfRSC5IFbRVm63gI3LIWgImGag=; h=From:To:Cc:Subject:Date:Reply-to:From; b=00ljRimtywQEomSlgRkArwnaZimItobPYFJv8hOPpmUnzsJdt+yGqTMv0/5YSK9iQ TMjvMS4od5gdDFK+6Z3K0IlcQnXLxHT/04ajSwbVCKVpQNsNdkLXs/Ayl80BOAKu+b tv8aVrvQ2+wBX6+Rwncb5Wleog+JiaUwT0DcaRSc= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-57886: mm/damon/core: fix new damon_target objects leaks on damon_commit_targets() Date: Wed, 15 Jan 2025 14:06:09 +0100 Message-ID: <2025011511-CVE-2024-57886-9059@gregkh> X-Mailer: git-send-email 2.48.0 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=2747; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=dgjk/3S/DAz4uyfnpMfRSC5IFbRVm63gI3LIWgImGag=; b=owGbwMvMwCRo6H6F97bub03G02pJDOntmw6b8Cn1T4/Z+176dp3BxZkT2MJ2Fh9/yj3pUNbjV 2Fi/GtndsSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEWhgY5heq719dvWBL9nxN p945y+cYF8zhjmZYsOLzivOxlxyklY/c+OxreC769804LgA= 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: mm/damon/core: fix new damon_target objects leaks on damon_commit_targets() Patch series "mm/damon/core: fix memory leaks and ignored inputs from damon_commit_ctx()". Due to two bugs in damon_commit_targets() and damon_commit_schemes(), which are called from damon_commit_ctx(), some user inputs can be ignored, and some mmeory objects can be leaked. Fix those. Note that only DAMON sysfs interface users are affected. Other DAMON core API user modules that more focused more on simple and dedicated production usages, including DAMON_RECLAIM and DAMON_LRU_SORT are not using the buggy function in the way, so not affected. This patch (of 2): When new DAMON targets are added via damon_commit_targets(), the newly created targets are not deallocated when updating the internal data (damon_commit_target()) is failed. Worse yet, even if the setup is successfully done, the new target is not linked to the context. Hence, the new targets are always leaked regardless of the internal data setup failure. Fix the leaks. The Linux kernel CVE team has assigned CVE-2024-57886 to this issue. Affected and fixed versions =========================== Issue introduced in 6.11 with commit 9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a and fixed in 6.12.9 with commit 3647932d0b3e609c762c55e8f9fe10a09776e0a7 Issue introduced in 6.11 with commit 9cb3d0b9dfce6a3258d91e6d69e418d0b4cce46a and fixed in 6.13-rc6 with commit 8debfc5b1aa569d3d2ac836af2553da037611c61 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-57886 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: mm/damon/core.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/3647932d0b3e609c762c55e8f9fe10a09776e0a7 https://git.kernel.org/stable/c/8debfc5b1aa569d3d2ac836af2553da037611c61