CVE-2023-52560
Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
02/03/2024
Last modified:
11/12/2024
Description
In the Linux kernel, the following vulnerability has been resolved:<br />
<br />
mm/damon/vaddr-test: fix memory leak in damon_do_test_apply_three_regions()<br />
<br />
When CONFIG_DAMON_VADDR_KUNIT_TEST=y and making CONFIG_DEBUG_KMEMLEAK=y<br />
and CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y, the below memory leak is detected.<br />
<br />
Since commit 9f86d624292c ("mm/damon/vaddr-test: remove unnecessary<br />
variables"), the damon_destroy_ctx() is removed, but still call<br />
damon_new_target() and damon_new_region(), the damon_region which is<br />
allocated by kmem_cache_alloc() in damon_new_region() and the damon_target<br />
which is allocated by kmalloc in damon_new_target() are not freed. And<br />
the damon_region which is allocated in damon_new_region() in<br />
damon_set_regions() is also not freed.<br />
<br />
So use damon_destroy_target to free all the damon_regions and damon_target.<br />
<br />
unreferenced object 0xffff888107c9a940 (size 64):<br />
comm "kunit_try_catch", pid 1069, jiffies 4294670592 (age 732.761s)<br />
hex dump (first 32 bytes):<br />
00 00 00 00 00 00 00 00 06 00 00 00 6b 6b 6b 6b ............kkkk<br />
60 c7 9c 07 81 88 ff ff f8 cb 9c 07 81 88 ff ff `...............<br />
backtrace:<br />
[] kmalloc_trace+0x27/0xa0<br />
[] damon_new_target+0x3f/0x1b0<br />
[] damon_do_test_apply_three_regions.constprop.0+0x95/0x3e0<br />
[] damon_test_apply_three_regions1+0x21e/0x260<br />
[] kunit_generic_run_threadfn_adapter+0x4a/0x90<br />
[] kthread+0x2b6/0x380<br />
[] ret_from_fork+0x2d/0x70<br />
[] ret_from_fork_asm+0x11/0x20<br />
unreferenced object 0xffff8881079cc740 (size 56):<br />
comm "kunit_try_catch", pid 1069, jiffies 4294670592 (age 732.761s)<br />
hex dump (first 32 bytes):<br />
05 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 ................<br />
6b 6b 6b 6b 6b 6b 6b 6b 00 00 00 00 6b 6b 6b 6b kkkkkkkk....kkkk<br />
backtrace:<br />
[] damon_new_region+0x22/0x1c0<br />
[] damon_do_test_apply_three_regions.constprop.0+0xd1/0x3e0<br />
[] damon_test_apply_three_regions1+0x21e/0x260<br />
[] kunit_generic_run_threadfn_adapter+0x4a/0x90<br />
[] kthread+0x2b6/0x380<br />
[] ret_from_fork+0x2d/0x70<br />
[] ret_from_fork_asm+0x11/0x20<br />
unreferenced object 0xffff888107c9ac40 (size 64):<br />
comm "kunit_try_catch", pid 1071, jiffies 4294670595 (age 732.843s)<br />
hex dump (first 32 bytes):<br />
00 00 00 00 00 00 00 00 06 00 00 00 6b 6b 6b 6b ............kkkk<br />
a0 cc 9c 07 81 88 ff ff 78 a1 76 07 81 88 ff ff ........x.v.....<br />
backtrace:<br />
[] kmalloc_trace+0x27/0xa0<br />
[] damon_new_target+0x3f/0x1b0<br />
[] damon_do_test_apply_three_regions.constprop.0+0x95/0x3e0<br />
[] damon_test_apply_three_regions2+0x21e/0x260<br />
[] kunit_generic_run_threadfn_adapter+0x4a/0x90<br />
[] kthread+0x2b6/0x380<br />
[] ret_from_fork+0x2d/0x70<br />
[] ret_from_fork_asm+0x11/0x20<br />
unreferenced object 0xffff8881079ccc80 (size 56):<br />
comm "kunit_try_catch", pid 1071, jiffies 4294670595 (age 732.843s)<br />
hex dump (first 32 bytes):<br />
05 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 ................<br />
6b 6b 6b 6b 6b 6b 6b 6b 00 00 00 00 6b 6b 6b 6b kkkkkkkk....kkkk<br />
backtrace:<br />
[] damon_new_region+0x22/0x1c0<br />
[] damon_do_test_apply_three_regions.constprop.0+0xd1/0x3e0<br />
[] damon_test_apply_three_regions2+0x21e/0x260<br />
[] kunit_generic_run_threadfn_adapter+0x4a/0x90<br />
[] kthread+0x2b6/0x380<br />
[] ret_from_fork+0x2d/0x70<br />
[
Impact
Base Score 3.x
5.50
Severity 3.x
MEDIUM
Vulnerable products and versions
| CPE | From | Up to |
|---|---|---|
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 5.16 (including) | 6.1.56 (excluding) |
| cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* | 6.2 (including) | 6.5.6 (excluding) |
| cpe:2.3:o:linux:linux_kernel:6.6:rc1:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.6:rc2:*:*:*:*:*:* | ||
| cpe:2.3:o:linux:linux_kernel:6.6:rc3:*:*:*:*:*:* |
To consult the complete list of CPE names with products and versions, see this page
References to Advisories, Solutions, and Tools
- https://git.kernel.org/stable/c/45120b15743fa7c0aa53d5db6dfb4c8f87be4abd
- https://git.kernel.org/stable/c/6b522001693aa113d97a985abc5f6932972e8e86
- https://git.kernel.org/stable/c/9a4fe81a8644b717d57d81ce5849e16583b13fe8
- https://git.kernel.org/stable/c/45120b15743fa7c0aa53d5db6dfb4c8f87be4abd
- https://git.kernel.org/stable/c/6b522001693aa113d97a985abc5f6932972e8e86
- https://git.kernel.org/stable/c/9a4fe81a8644b717d57d81ce5849e16583b13fe8



