mm/damon/sysfs: dealloc repeat_call_control if damon_call() fails
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.236.19.137.0In the Linux kernel, the following vulnerability has been resolved:
mm/damon/sysfs: dealloc repeat_call_control if damon_call() fails
damon_call() for repeat_call_control of DAMON_SYSFS could fail if somehow the kdamond is stopped before the damon_call(). It could happen, for example, when te damon context was made for monitroing of a virtual address processes, and the process is terminated immediately, before the damon_call() invocation. In the case, the dyanmically allocated repeat_call_control is not deallocated and leaked.
Fix the leak by deallocating the repeat_call_control under the damon_call() failure.
This issue is discovered by sashiko [1].
From the CVE record · Linux
The Linux kernel’s DAMON sysfs code can leak an allocated control structure if damon_call() fails. This can happen when a monitored process terminates before the call, stopping kdamond. The input does not establish whether an attacker can trigger this or what access they would need.
Engineers running Linux kernels that use DAMON sysfs should check whether their kernel is affected; affected versions are not specified.