# CVE-2024-50068: mm/damon/tests/sysfs-kunit.h: fix memory leak in damon_sysfs_test_add_targets()

- Severity: Medium 5.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 7% of CVEs (2026-12-01)
- Published: 2024-10-29T00:50:08.897Z
- Modified: 2026-06-17T08:03:30.193Z
- Weaknesses: CWE-401
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

## 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

(As written by CVE List.)

## Affected

- Linux Linux: from b8ee5575f763c239902f8523d82103a45c153b29 before 05d43455f6bffa6abc7b937ca58be00452e6973f; from b8ee5575f763c239902f8523d82103a45c153b29 before 2d6a1c835685de3b0c8e8dc871f60f4ef92ab01a; 6.7 (not affected: before 6.7; from 6.11.5 up to 6.11.*; from 6.12 up to *)
- linux linux_kernel: from 6.7 before 6.11.5; 6.12

## Every score

- CISA-ADP: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/05d43455f6bffa6abc7b937ca58be00452e6973f> (patch)
- <https://git.kernel.org/stable/c/2d6a1c835685de3b0c8e8dc871f60f4ef92ab01a> (patch)

## Sources

- CVE List: [CVE-2024-50068](https://www.cve.org/CVERecord?id=CVE-2024-50068), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2024-50068](https://nvd.nist.gov/vuln/detail/CVE-2024-50068), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-50068 · Whole record: https://cve.day/CVE-2024-50068.json · Rebuilt by cve.day 2026-11-25T22:58:47.440Z
