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.
History

No history.

cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published: 2024-02-27T09:44:03.421Z

Updated: 2024-08-04T05:17:43.028Z

Reserved: 2024-02-25T13:45:52.721Z

Link: CVE-2021-46937

cve-icon Vulnrichment

Updated: 2024-08-04T05:17:43.028Z

cve-icon NVD

Status : Analyzed

Published: 2024-02-27T10:15:08.067

Modified: 2024-04-10T18:59:16.507

Link: CVE-2021-46937

cve-icon Redhat

Severity : Low

Publid Date: 2024-02-27T00:00:00Z

Links: CVE-2021-46937 - Bugzilla