CVE-2022-49334

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49334
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-49334.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2022-49334
Downstream
Published
2025-02-26T02:10:52Z
Modified
2025-10-21T09:44:11.576343Z
Severity
  • 5.5 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H CVSS Calculator
Summary
mm/huge_memory: Fix xarray node memory leak
Details

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

mm/huge_memory: Fix xarray node memory leak

If xassplitalloc() fails to allocate the necessary nodes to complete the xarray entry split, it sets the xastate to -ENOMEM, which xasnomem() then interprets as "Please allocate more memory", not as "Please free any unnecessary memory" (which was the intended outcome). It's confusing to use xasnomem() to free memory in this context, so call xasdestroy() instead.

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
6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3
Fixed
c0c84962e297927ba57fd6ddc2bb000c9d149655
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3
Fixed
95c8181b4947e000f3b9b8e5918d899fce77b93d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
6b24ca4a1a8d4ee3221d6d44ddbb99f542e4bda3
Fixed
69a37a8ba1b408a1c7616494aa7018e4b3844cbe

Affected versions

v5.*

v5.16
v5.16-rc5
v5.16-rc6
v5.16-rc7
v5.16-rc8
v5.17
v5.17-rc1
v5.17-rc2
v5.17-rc3
v5.17-rc4
v5.17-rc5
v5.17-rc6
v5.17-rc7
v5.17-rc8
v5.17.1
v5.17.10
v5.17.11
v5.17.12
v5.17.13
v5.17.14
v5.17.2
v5.17.3
v5.17.4
v5.17.5
v5.17.6
v5.17.7
v5.17.8
v5.17.9
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.2
v5.18.3
v5.19-rc1

Database specific

vanir_signatures

[
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95c8181b4947e000f3b9b8e5918d899fce77b93d",
        "id": "CVE-2022-49334-13abdc12",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "mm/huge_memory.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "14439872449110486227384767057766461762",
                "46618838516996011369680556704199506503",
                "158410758069945922339704784408695865564",
                "197137328188606109257646065087060248212"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95c8181b4947e000f3b9b8e5918d899fce77b93d",
        "id": "CVE-2022-49334-3ba0100f",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "xas_destroy",
            "file": "lib/xarray.c"
        },
        "signature_type": "Function",
        "digest": {
            "length": 261.0,
            "function_hash": "146161676761896145154023187259949690281"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69a37a8ba1b408a1c7616494aa7018e4b3844cbe",
        "id": "CVE-2022-49334-40211901",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "include/linux/xarray.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "58166498896075545065489132005732286922",
                "293227256705637170156392078359087468126",
                "113545793483317555763583195201160832195",
                "328307685314738441633531478718782912029"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95c8181b4947e000f3b9b8e5918d899fce77b93d",
        "id": "CVE-2022-49334-52d96dde",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "include/linux/xarray.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "58166498896075545065489132005732286922",
                "293227256705637170156392078359087468126",
                "113545793483317555763583195201160832195",
                "328307685314738441633531478718782912029"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95c8181b4947e000f3b9b8e5918d899fce77b93d",
        "id": "CVE-2022-49334-5bfabb2c",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "split_huge_page_to_list",
            "file": "mm/huge_memory.c"
        },
        "signature_type": "Function",
        "digest": {
            "length": 2081.0,
            "function_hash": "268391243922141939653220614045715535418"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0c84962e297927ba57fd6ddc2bb000c9d149655",
        "id": "CVE-2022-49334-6101b7ea",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "include/linux/xarray.h"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "58166498896075545065489132005732286922",
                "293227256705637170156392078359087468126",
                "113545793483317555763583195201160832195",
                "328307685314738441633531478718782912029"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0c84962e297927ba57fd6ddc2bb000c9d149655",
        "id": "CVE-2022-49334-67b06bd9",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "mm/huge_memory.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "14439872449110486227384767057766461762",
                "46618838516996011369680556704199506503",
                "158410758069945922339704784408695865564",
                "197137328188606109257646065087060248212"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0c84962e297927ba57fd6ddc2bb000c9d149655",
        "id": "CVE-2022-49334-992e8e48",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "lib/xarray.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "192681137181484380147435557065738872474",
                "40401710955296260149344318763598141690",
                "311531085406068640529856430631555080744",
                "229917287419915864395665490153695034461"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69a37a8ba1b408a1c7616494aa7018e4b3844cbe",
        "id": "CVE-2022-49334-9cf1d2f2",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "mm/huge_memory.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "14439872449110486227384767057766461762",
                "46618838516996011369680556704199506503",
                "158410758069945922339704784408695865564",
                "197137328188606109257646065087060248212"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69a37a8ba1b408a1c7616494aa7018e4b3844cbe",
        "id": "CVE-2022-49334-ad3293b2",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "lib/xarray.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "192681137181484380147435557065738872474",
                "40401710955296260149344318763598141690",
                "311531085406068640529856430631555080744",
                "229917287419915864395665490153695034461"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0c84962e297927ba57fd6ddc2bb000c9d149655",
        "id": "CVE-2022-49334-c172cd5b",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "xas_destroy",
            "file": "lib/xarray.c"
        },
        "signature_type": "Function",
        "digest": {
            "length": 261.0,
            "function_hash": "146161676761896145154023187259949690281"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69a37a8ba1b408a1c7616494aa7018e4b3844cbe",
        "id": "CVE-2022-49334-f0899c3e",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "xas_destroy",
            "file": "lib/xarray.c"
        },
        "signature_type": "Function",
        "digest": {
            "length": 261.0,
            "function_hash": "146161676761896145154023187259949690281"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@69a37a8ba1b408a1c7616494aa7018e4b3844cbe",
        "id": "CVE-2022-49334-f512768c",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "split_huge_page_to_list",
            "file": "mm/huge_memory.c"
        },
        "signature_type": "Function",
        "digest": {
            "length": 2081.0,
            "function_hash": "268391243922141939653220614045715535418"
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95c8181b4947e000f3b9b8e5918d899fce77b93d",
        "id": "CVE-2022-49334-f8b40df4",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "file": "lib/xarray.c"
        },
        "signature_type": "Line",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "192681137181484380147435557065738872474",
                "40401710955296260149344318763598141690",
                "311531085406068640529856430631555080744",
                "229917287419915864395665490153695034461"
            ]
        }
    },
    {
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c0c84962e297927ba57fd6ddc2bb000c9d149655",
        "id": "CVE-2022-49334-fe84a024",
        "deprecated": false,
        "signature_version": "v1",
        "target": {
            "function": "split_huge_page_to_list",
            "file": "mm/huge_memory.c"
        },
        "signature_type": "Function",
        "digest": {
            "length": 2050.0,
            "function_hash": "126062752058791351616220767325603239755"
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.17.0
Fixed
5.17.15
Type
ECOSYSTEM
Events
Introduced
5.18.0
Fixed
5.18.4