CVE-2022-50088

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-50088
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50088.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50088
Downstream
Published
2025-06-18T11:02:28Z
Modified
2025-10-14T00:05:47.019575Z
Summary
mm/damon/reclaim: fix potential memory leak in damon_reclaim_init()
Details

In the Linux kernel, the following vulnerability has been resolved:

mm/damon/reclaim: fix potential memory leak in damonreclaiminit()

damonreclaiminit() allocates a memory chunk for ctx with damonnewctx(). When damonselectops() fails, ctx is not released, which will lead to a memory leak.

We should release the ctx with damondestroyctx() when damonselectops() fails to fix the memory leak.

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4d69c3457821100a39fa8c6e0c23ed910bb6c29d
Fixed
9d3e9e1e0856f4c905bbb870f16f42ae72477071
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4d69c3457821100a39fa8c6e0c23ed910bb6c29d
Fixed
700aa4e11a3c4d2a44d06758db431a013d9e1b61
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
4d69c3457821100a39fa8c6e0c23ed910bb6c29d
Fixed
188043c7f4f2bd662f2a55957d684fffa543e600

Affected versions

v5.*

v5.18
v5.18-rc1
v5.18-rc2
v5.18-rc3
v5.18-rc4
v5.18-rc5
v5.18-rc6
v5.18-rc7
v5.18.1
v5.18.10
v5.18.11
v5.18.12
v5.18.13
v5.18.14
v5.18.15
v5.18.16
v5.18.17
v5.18.2
v5.18.3
v5.18.4
v5.18.5
v5.18.6
v5.18.7
v5.18.8
v5.18.9
v5.19
v5.19-rc1
v5.19-rc2
v5.19-rc3
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8
v5.19.1

Database specific

{
    "vanir_signatures": [
        {
            "digest": {
                "length": 489.0,
                "function_hash": "141240103787027292881128547507105990266"
            },
            "target": {
                "function": "damon_reclaim_init",
                "file": "mm/damon/reclaim.c"
            },
            "id": "CVE-2022-50088-1065ada3",
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@700aa4e11a3c4d2a44d06758db431a013d9e1b61",
            "signature_version": "v1"
        },
        {
            "digest": {
                "length": 489.0,
                "function_hash": "141240103787027292881128547507105990266"
            },
            "target": {
                "function": "damon_reclaim_init",
                "file": "mm/damon/reclaim.c"
            },
            "id": "CVE-2022-50088-1ff2dc49",
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@188043c7f4f2bd662f2a55957d684fffa543e600",
            "signature_version": "v1"
        },
        {
            "digest": {
                "line_hashes": [
                    "258401007391021944589230059167621319753",
                    "333868053013094252710365077147099200076",
                    "216427356369035920116067443717333252383",
                    "181970411697081743805982077017255034212",
                    "122109381572723384069873977927271438553"
                ],
                "threshold": 0.9
            },
            "target": {
                "file": "mm/damon/reclaim.c"
            },
            "id": "CVE-2022-50088-561d6f23",
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@700aa4e11a3c4d2a44d06758db431a013d9e1b61",
            "signature_version": "v1"
        },
        {
            "digest": {
                "line_hashes": [
                    "258401007391021944589230059167621319753",
                    "333868053013094252710365077147099200076",
                    "46345870959605970312964323860093181008",
                    "66793279562090567174252576868288552990",
                    "251171889880135502806912891124233315768"
                ],
                "threshold": 0.9
            },
            "target": {
                "file": "mm/damon/reclaim.c"
            },
            "id": "CVE-2022-50088-5ff05930",
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9d3e9e1e0856f4c905bbb870f16f42ae72477071",
            "signature_version": "v1"
        },
        {
            "digest": {
                "length": 380.0,
                "function_hash": "335171406044245395818006587007099972153"
            },
            "target": {
                "function": "damon_reclaim_init",
                "file": "mm/damon/reclaim.c"
            },
            "id": "CVE-2022-50088-77f8da02",
            "signature_type": "Function",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9d3e9e1e0856f4c905bbb870f16f42ae72477071",
            "signature_version": "v1"
        },
        {
            "digest": {
                "line_hashes": [
                    "258401007391021944589230059167621319753",
                    "333868053013094252710365077147099200076",
                    "216427356369035920116067443717333252383",
                    "181970411697081743805982077017255034212",
                    "122109381572723384069873977927271438553"
                ],
                "threshold": 0.9
            },
            "target": {
                "file": "mm/damon/reclaim.c"
            },
            "id": "CVE-2022-50088-e7c5280c",
            "signature_type": "Line",
            "deprecated": false,
            "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@188043c7f4f2bd662f2a55957d684fffa543e600",
            "signature_version": "v1"
        }
    ]
}

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
5.18.18
Type
ECOSYSTEM
Events
Introduced
5.19.0
Fixed
5.19.2