Vulnerability · Published Mar 2, 2024 · Assigned by Linux
CVE-2023-52560mm/damon/vaddr-test: fix memory leak in damon_do_test_apply_three_regions()
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.3% (higher than 17% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: mm/damon/vaddr-test: fix memory leak in damon_do_test_apply_three_regions() When CONFIG_DAMON_VADDR_KUNIT_TEST=y and making CONFIG_DEBUG_KMEMLEAK=y and CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y, the below memory leak is detected. Since commit 9f86d624292c ("mm/damon/vaddr-test: remove unnecessary variables"), the damon_destroy_ctx() is removed, but still call damon_new_target() and damon_new_region(), the damon_region which is allocated by kmem_cache_alloc() in damon_new_region() and the damon_target which is allocated by kmalloc in damon_new_target() are not freed. And the damon_region which is allocated in damon_new_region() in damon_set_regions() is also not freed. So use damon_destroy_target to free all the damon_regions and damon_target. unreferenced object 0xffff888107c9a940 (size 64): comm "kunit_try_catch", pid 1069, jiffies 4294670592 (age 732.761s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 06 00 00 00 6b 6b 6b 6b ............kkkk 60 c7 9c 07 81 88 ff ff f8 cb 9c 07 81 88 ff ff `............... backtrace: [<ffffffff817e0167>] kmalloc_trace+0x27/0xa0 [<ffffffff819c11cf>] damon_new_target+0x3f/0x1b0 [<ffffffff819c7d55>] damon_do_test_apply_three_regions.constprop.0+0x95/0x3e0 [<ffffffff819c82be>] damon_test_apply_three_regions1+0x21e/0x260 [<ffffffff829fce6a>] kunit_generic_run_threadfn_adapter+0x4a/0x90 [<ffffffff81237cf6>] kthread+0x2b6/0x380 [<ffffffff81097add>] ret_from_fork+0x2d/0x70 [<ffffffff81003791>] ret_from_fork_asm+0x11/0x20 unreferenced object 0xffff8881079cc740 (size 56): comm "kunit_try_catch", pid 1069, jiffies 4294670592 (age 732.761s) hex dump (first 32 bytes): 05 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 ................ 6b 6b 6b 6b 6b 6b 6b 6b 00 00 00 00 6b 6b 6b 6b kkkkkkkk....kkkk backtrace: [<ffffffff819bc492>] damon_new_region+0x22/0x1c0 [<ffffffff819c7d91>] damon_do_test_apply_three_regions.constprop.0+0xd1/0x3e0 [<ffffffff819c82be>] damon_test_apply_three_regions1+0x21e/0x260 [<ffffffff829fce6a>] kunit_generic_run_threadfn_adapter+0x4a/0x90 [<ffffffff81237cf6>] kthread+0x2b6/0x380 [<ffffffff81097add>] ret_from_fork+0x2d/0x70 [<ffffffff81003791>] ret_from_fork_asm+0x11/0x20 unreferenced object 0xffff888107c9ac40 (size 64): comm "kunit_try_catch", pid 1071, jiffies 4294670595 (age 732.843s) hex dump (first 32 bytes): 00 00 00 00 00 00 00 00 06 00 00 00 6b 6b 6b 6b ............kkkk a0 cc 9c 07 81 88 ff ff 78 a1 76 07 81 88 ff ff ........x.v..... backtrace: [<ffffffff817e0167>] kmalloc_trace+0x27/0xa0 [<ffffffff819c11cf>] damon_new_target+0x3f/0x1b0 [<ffffffff819c7d55>] damon_do_test_apply_three_regions.constprop.0+0x95/0x3e0 [<ffffffff819c851e>] damon_test_apply_three_regions2+0x21e/0x260 [<ffffffff829fce6a>] kunit_generic_run_threadfn_adapter+0x4a/0x90 [<ffffffff81237cf6>] kthread+0x2b6/0x380 [<ffffffff81097add>] ret_from_fork+0x2d/0x70 [<ffffffff81003791>] ret_from_fork_asm+0x11/0x20 unreferenced object 0xffff8881079ccc80 (size 56): comm "kunit_try_catch", pid 1071, jiffies 4294670595 (age 732.843s) hex dump (first 32 bytes): 05 00 00 00 00 00 00 00 14 00 00 00 00 00 00 00 ................ 6b 6b 6b 6b 6b 6b 6b 6b 00 00 00 00 6b 6b 6b 6b kkkkkkkk....kkkk backtrace: [<ffffffff819bc492>] damon_new_region+0x22/0x1c0 [<ffffffff819c7d91>] damon_do_test_apply_three_regions.constprop.0+0xd1/0x3e0 [<ffffffff819c851e>] damon_test_apply_three_regions2+0x21e/0x260 [<ffffffff829fce6a>] kunit_generic_run_threadfn_adapter+0x4a/0x90 [<ffffffff81237cf6>] kthread+0x2b6/0x380 [<ffffffff81097add>] ret_from_fork+0x2d/0x70 [<ffff ---truncated---
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | bpftool | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-abi-stablelists | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-core | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-cross-headers | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-core | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-modules | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-debug-modules-extra | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-doc | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-headers | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-modules | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-modules-extra | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-rt | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-core | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-core | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-devel | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-kvm | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-modules | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-debug-modules-extra | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-devel | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-kvm | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-modules | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-rt-modules-extra | 4.18.0-553.8.1.rt7.349.el8_10 | ALSA-2024:4352 |
| AlmaLinux:8 | kernel-tools | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-tools-libs | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-tools-libs-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-core | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-devel | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-modules | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | kernel-zfcpdump-modules-extra | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | perf | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| AlmaLinux:8 | python3-perf | 4.18.0-553.8.1.el8_10 | ALSA-2024:4211 |
| Debian:12 | linux | 6.1.64-1 | DEBIAN-CVE-2023-52560 |
| Debian:13 | linux | 6.5.6-1 | DEBIAN-CVE-2023-52560 |
| Debian:14 | linux | 6.5.6-1 | DEBIAN-CVE-2023-52560 |
| Rocky Linux:8 | kernel | 0:4.18.0-553.8.1.el8_10 | RLSA-2024:4211 |
| Rocky Linux:8 | kernel-rt | 0:4.18.0-553.8.1.rt7.349.el8_10 | RLSA-2024:4352 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | 6.5.0-1013.13~22.04.1 | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | 6.5.0-17.17~22.04.1 | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-intel-iot-realtime | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | 6.5.0-17.17.1.1.1~22.04.1 | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | 6.5.0-1014.14 | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | 6.5.0-1014.15 | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | 6.5.0-1015.15~22.04.1 | UBUNTU-CVE-2023-52560 |
| Ubuntu:24.04:LTS | linux-raspi | 6.7.0-1001.1 | UBUNTU-CVE-2023-52560 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52560 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52560 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 9f86d624292c238203b3687cdb870a2cde1a6f9b – before 9a4fe81a8644b717d57d81ce5849e16583b13fe89f86d624292c238203b3687cdb870a2cde1a6f9b – before 6b522001693aa113d97a985abc5f6932972e8e869f86d624292c238203b3687cdb870a2cde1a6f9b – before 45120b15743fa7c0aa53d5db6dfb4c8f87be4abd |
| Linux | Linux | 5.16 |