Vulnerability · Published Feb 27, 2024 · Assigned by Linux

CVE-2021-46937mm/damon/dbgfs: fix 'struct pid' leaks in 'dbgfs_target_ids_write()'

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.2% (higher than 13% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS NVD)5.5Medium
Exploit odds (30 days)0.2%top 87.2% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

In the Linux kernel, the following vulnerability has been resolved: mm/damon/dbgfs: fix 'struct pid' leaks in 'dbgfs_target_ids_write()' DAMON debugfs interface increases the reference counts of 'struct pid's for targets from the 'target_ids' file write callback ('dbgfs_target_ids_write()'), but decreases the counts only in DAMON monitoring termination callback ('dbgfs_before_terminate()'). Therefore, when 'target_ids' file is repeatedly written without DAMON monitoring start/termination, the reference count is not decreased and therefore memory for the 'struct pid' cannot be freed. This commit fixes this issue by decreasing the reference counts when 'target_ids' is written.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12linux5.15.15-1DEBIAN-CVE-2021-46937
Debian:13linux5.15.15-1DEBIAN-CVE-2021-46937
Debian:14linux5.15.15-1DEBIAN-CVE-2021-46937
Ubuntu:22.04:LTSlinux-allwinner-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-aws-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-aws-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-azure-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-azure-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-azure-fde-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-azure-fde-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-gcp-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-gcp-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-hwe-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-hwe-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-lowlatency-hwe-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-lowlatency-hwe-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-nvidia-6.2no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-oem-5.17no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-oem-6.0no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-oem-6.1no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-riscvno fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-riscv-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-starfive-5.19no fix listedUBUNTU-CVE-2021-46937
Ubuntu:22.04:LTSlinux-starfive-6.2no fix listedUBUNTU-CVE-2021-46937

Affected products (as reported)

VendorProductVersions
Linux Linux 4bc05954d0076655cfaf6f0135585bdc20cd6b11 – before ffe4a1ba1a82c416a6b3a09d46594f6a885ae1414bc05954d0076655cfaf6f0135585bdc20cd6b11 – before ebb3f994dd92f8fb4d70c7541091216c1e10cb71
Linux Linux 5.15

References