CVE-2022-50088

Source
https://cve.org/CVERecord?id=CVE-2022-50088
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50088.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-50088
Downstream
Published
2025-06-18T11:02:28.802Z
Modified
2026-03-11T09:19:05.505256Z
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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50088.json",
    "cna_assigner": "Linux"
}
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
Fixed
700aa4e11a3c4d2a44d06758db431a013d9e1b61
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

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