mm/damon/reclaim: fix potential memory leak in damon_reclaim_init()
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 |
|
|
5.18.185.19.26.0In the Linux kernel, the following vulnerability has been resolved:
mm/damon/reclaim: fix potential memory leak in damon_reclaim_init()
damon_reclaim_init() allocates a memory chunk for ctx with damon_new_ctx(). When damon_select_ops() fails, ctx is not released, which will lead to a memory leak.
We should release the ctx with damon_destroy_ctx() when damon_select_ops() fails to fix the memory leak.
From the CVE record · Linux
The Linux kernel's damon_reclaim_init() can leak memory allocated for a context when damon_select_ops() fails. The input does not establish whether an attacker can trigger this failure or specify network, authentication, or user-interaction conditions.
Engineers running the Linux kernel should check their versions; affected versions were not provided.