From mboxrd@z Thu Jan 1 00:00:00 1970 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 B14C01E767B for ; Mon, 21 Oct 2024 20:12:12 +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=1729541532; cv=none; b=TIYHiVJdeVEb3LaC9i3LzsX9EZ9ZlcmvFLzNNua8eI3cCZFAd5kJfQ5pI5IhWHTEV0Ew2eW07oCNaZdbrSymsZdLjAocDyAarqxBC1+BRAnKbhMg234Su65/lij6dTySay04pC7hNdQUh1vrBh6rqL9AUO+/HKVrgfxf+IsSyDA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541532; c=relaxed/simple; bh=k21bqK8Zjxrr02C4FoWGpUwiruwJQKh8gXrXqSwX1NU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=rz60Vid86ApP/xi9B4VymI7XRERHijRGxbWmVFPE/tlvWr3vwX1zPXBV7kHYYeq55Kes/477010yE8WX/51/mIbFuvVa8KpdvCZPZ1R7nS89GitBZLgyUfQTqVZSyI5zKz5vT6GlSmU/9SzGnu4krqdArJDSxQ/Yl9RHSObX984= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OMDmIVz5; 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="OMDmIVz5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D9F4FC4CEC3; Mon, 21 Oct 2024 20:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729541532; bh=k21bqK8Zjxrr02C4FoWGpUwiruwJQKh8gXrXqSwX1NU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=OMDmIVz5xPZC+XWYWMH6UbVgrcpIktei/aanddjwR80BxFqrX/XnItrpuBjGR2D6R j3TXNTxqbXfbVk4kIDEd+pbPzOA+z9STxhms4iycbR8XGO/x8Bm2bBj3KEr0mXj0JO fdtbrXIIJEjQGaMllIWL9gNB5i5NaagrMhQ0M33A= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-48996: mm/damon/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes() Date: Mon, 21 Oct 2024 22:06:28 +0200 Message-ID: <2024102149-CVE-2022-48996-e9ca@gregkh> X-Mailer: git-send-email 2.47.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=2424; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=k21bqK8Zjxrr02C4FoWGpUwiruwJQKh8gXrXqSwX1NU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliW2SXubMLcAuvVmrST2z2fney5G9IBmPV8v87njhcN On9n9rXEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMJi2OY72V4Su0I50aBC9IR nP/vXygw8NilwrDg/OnmdZMM0l+lx6y+9O5orua7p9e3AAA= 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/sysfs: fix wrong empty schemes assumption under online tuning in damon_sysfs_set_schemes() Commit da87878010e5 ("mm/damon/sysfs: support online inputs update") made 'damon_sysfs_set_schemes()' to be called for running DAMON context, which could have schemes. In the case, DAMON sysfs interface is supposed to update, remove, or add schemes to reflect the sysfs files. However, the code is assuming the DAMON context wouldn't have schemes at all, and therefore creates and adds new schemes. As a result, the code doesn't work as intended for online schemes tuning and could have more than expected memory footprint. The schemes are all in the DAMON context, so it doesn't leak the memory, though. Remove the wrong asssumption (the DAMON context wouldn't have schemes) in 'damon_sysfs_set_schemes()' to fix the bug. The Linux kernel CVE team has assigned CVE-2022-48996 to this issue. Affected and fixed versions =========================== Issue introduced in 5.19 with commit da87878010e5 and fixed in 6.0.12 with commit f98d1f2a36ad Issue introduced in 5.19 with commit da87878010e5 and fixed in 6.1 with commit 95bc35f9bee5 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-2022-48996 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/sysfs.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/f98d1f2a36ad7ab48fb4cf73ca14e7b19482fd4d https://git.kernel.org/stable/c/95bc35f9bee5220dad4e8567654ab3288a181639