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 2B1782629F for ; Tue, 29 Oct 2024 00:50:54 +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=1730163055; cv=none; b=aXuWAN92Ifml4OgwQ1f1z+SznSb9rfn6iCx5W8cpxCRBc9qsKpW4jDg/6H0qY6bZC+wcDXB6jrt1sfW5HQ2n5dVZiRXLYq6rWiQnme7GuYgwVT4g1WgvRlstfTUmZyxnfOyvH9VQixTvOn1YmyXFjrBcZd/ZE5SweLbZsskTDaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730163055; c=relaxed/simple; bh=j5LKtPCrLKcfJMgp2vLPsW7Es4AururxMZMmgPDi3ZU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=HZWHN0EYAzd3KZtdRFipWCwwzMEldEKomILw5KP+p11na6ihk0HGf5ky9185Po9dHY5RHoPWNFHHDsF5bFQNguz02y9xrxz5SAl95aps/5zO/jAe+PnOmVCutJXEbQ61xgytdVWdTq1zd4ptw+BTwlyc/OfzgkF9+gvMJzl2pgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=MFOe5/K3; 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="MFOe5/K3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 58A32C4CEC3; Tue, 29 Oct 2024 00:50:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1730163054; bh=j5LKtPCrLKcfJMgp2vLPsW7Es4AururxMZMmgPDi3ZU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=MFOe5/K368u+yFN25bjhOx4jU3jLYk9/csrQA31qh0GGIZLjmfhNA1s8w7WzkDFDE nH22OjyMa9tF/jkn2U0K9UGoXGVswDYqSqVZi6I+NauNf7eTtAkXRN4vtRo/Ydpruw bgt+0nusrD2ihHixCProN+tRStUGY1VhA3HpwALo= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-50068: mm/damon/tests/sysfs-kunit.h: fix memory leak in damon_sysfs_test_add_targets() Date: Tue, 29 Oct 2024 01:50:31 +0100 Message-ID: <2024102930-CVE-2024-50068-2e3c@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=2573; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=j5LKtPCrLKcfJMgp2vLPsW7Es4AururxMZMmgPDi3ZU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOkKhmHVoQ/D9tp4Wa5YprtG4qz40/NOf1Wdv15VM6xh2 lQhmanREcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABMpvs4wP+H3Sz1Z7/1+D4rq ri6+fir6WnOfNMM84yWbXubV2s/PrJ4cufBy1dUJcceSAA== 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/tests/sysfs-kunit.h: fix memory leak in damon_sysfs_test_add_targets() The sysfs_target->regions allocated in damon_sysfs_regions_alloc() is not freed in damon_sysfs_test_add_targets(), which cause the following memory leak, free it to fix it. unreferenced object 0xffffff80c2a8db80 (size 96): comm "kunit_try_catch", pid 187, jiffies 4294894363 hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ backtrace (crc 0): [<0000000001e3714d>] kmemleak_alloc+0x34/0x40 [<000000008e6835c1>] __kmalloc_cache_noprof+0x26c/0x2f4 [<000000001286d9f8>] damon_sysfs_test_add_targets+0x1cc/0x738 [<0000000032ef8f77>] kunit_try_run_case+0x13c/0x3ac [<00000000f3edea23>] kunit_generic_run_threadfn_adapter+0x80/0xec [<00000000adf936cf>] kthread+0x2e8/0x374 [<0000000041bb1628>] ret_from_fork+0x10/0x20 The Linux kernel CVE team has assigned CVE-2024-50068 to this issue. Affected and fixed versions =========================== Issue introduced in 6.7 with commit b8ee5575f763 and fixed in 6.11.5 with commit 05d43455f6bf Issue introduced in 6.7 with commit b8ee5575f763 and fixed in 6.12-rc4 with commit 2d6a1c835685 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-50068 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/tests/sysfs-kunit.h 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/05d43455f6bffa6abc7b937ca58be00452e6973f https://git.kernel.org/stable/c/2d6a1c835685de3b0c8e8dc871f60f4ef92ab01a