In the Linux kernel, the following vulnerability has been resolved:
mm/damon/tests/sysfs-kunit.h: fix memory leak in damonsysfstestaddtargets()
The sysfstarget->regions allocated in damonsysfsregionsalloc() is not freed in damonsysfstestaddtargets(), 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
[
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2d6a1c835685de3b0c8e8dc871f60f4ef92ab01a",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282167662702871823825980697528104762152",
"270930244565601782777521366982263127870",
"247105341107747087400584415094349368341",
"89159048474887337534688429878775394915"
]
},
"target": {
"file": "mm/damon/tests/sysfs-kunit.h"
},
"id": "CVE-2024-50068-66ae3def",
"signature_version": "v1",
"signature_type": "Line"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2d6a1c835685de3b0c8e8dc871f60f4ef92ab01a",
"digest": {
"function_hash": "273700745337692665149775456934073065798",
"length": 631.0
},
"target": {
"function": "damon_sysfs_test_add_targets",
"file": "mm/damon/tests/sysfs-kunit.h"
},
"id": "CVE-2024-50068-880243e0",
"signature_version": "v1",
"signature_type": "Function"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@05d43455f6bffa6abc7b937ca58be00452e6973f",
"digest": {
"function_hash": "273700745337692665149775456934073065798",
"length": 631.0
},
"target": {
"function": "damon_sysfs_test_add_targets",
"file": "mm/damon/sysfs-test.h"
},
"id": "CVE-2024-50068-912309f9",
"signature_version": "v1",
"signature_type": "Function"
},
{
"deprecated": false,
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@05d43455f6bffa6abc7b937ca58be00452e6973f",
"digest": {
"threshold": 0.9,
"line_hashes": [
"282167662702871823825980697528104762152",
"270930244565601782777521366982263127870",
"247105341107747087400584415094349368341",
"89159048474887337534688429878775394915"
]
},
"target": {
"file": "mm/damon/sysfs-test.h"
},
"id": "CVE-2024-50068-c0d7c3c6",
"signature_version": "v1",
"signature_type": "Line"
}
]