CVE-2022-49894

Source
https://nvd.nist.gov/vuln/detail/CVE-2022-49894
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-49894.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-49894
Downstream
Published
2025-05-01T14:10:37.109Z
Modified
2025-11-15T00:26:52.368582Z
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
cxl/region: Fix region HPA ordering validation
Details

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

cxl/region: Fix region HPA ordering validation

Some regions may not have any address space allocated. Skip them when validating HPA order otherwise a crash like the following may result:

devmcxladdregion: cxlacpi cxlacpi.0: decoder3.4: created region9 BUG: kernel NULL pointer dereference, address: 0000000000000000 [..] RIP: 0010:storetargetN+0x655/0x1740 [cxlcore] [..] Call Trace: <TASK> kernfsfopwriteiter+0x144/0x200 vfswrite+0x24a/0x4d0 ksyswrite+0x69/0xf0 dosyscall64+0x3a/0x90

storetargetN+0x655/0x1740: allocregionref at drivers/cxl/core/region.c:676 (inlined by) cxlportattachregion at drivers/cxl/core/region.c:850 (inlined by) cxlregionattach at drivers/cxl/core/region.c:1290 (inlined by) attachtarget at drivers/cxl/core/region.c:1410 (inlined by) storetargetN at drivers/cxl/core/region.c:1453

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
384e624bb211b406db40edc900bb51af8bb267d0
Fixed
12316b9f7c18138ae656050cfd716728e27b7e2f
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
384e624bb211b406db40edc900bb51af8bb267d0
Fixed
a90accb358ae33ea982a35595573f7a045993f8b

Affected versions

v5.*

v5.19
v5.19-rc4
v5.19-rc5
v5.19-rc6
v5.19-rc7
v5.19-rc8

v6.*

v6.0
v6.0-rc1
v6.0-rc2
v6.0-rc3
v6.0-rc4
v6.0-rc5
v6.0-rc6
v6.0-rc7
v6.0.1
v6.0.2
v6.0.3
v6.0.4
v6.0.5
v6.0.6
v6.0.7
v6.1-rc1

Database specific

vanir_signatures

[
    {
        "id": "CVE-2022-49894-192f98f1",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12316b9f7c18138ae656050cfd716728e27b7e2f",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "116096487586774575592447200052644284226",
                "294851709607627824392127745382629423184",
                "202098278793193884605262936899086929317"
            ]
        },
        "signature_version": "v1",
        "deprecated": false,
        "target": {
            "file": "drivers/cxl/core/region.c"
        }
    },
    {
        "id": "CVE-2022-49894-34d6dfa2",
        "signature_type": "Function",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a90accb358ae33ea982a35595573f7a045993f8b",
        "digest": {
            "function_hash": "224658335636933940160965125101092533301",
            "length": 966.0
        },
        "signature_version": "v1",
        "deprecated": false,
        "target": {
            "file": "drivers/cxl/core/region.c",
            "function": "alloc_region_ref"
        }
    },
    {
        "id": "CVE-2022-49894-42001ff3",
        "signature_type": "Function",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@12316b9f7c18138ae656050cfd716728e27b7e2f",
        "digest": {
            "function_hash": "224658335636933940160965125101092533301",
            "length": 966.0
        },
        "signature_version": "v1",
        "deprecated": false,
        "target": {
            "file": "drivers/cxl/core/region.c",
            "function": "alloc_region_ref"
        }
    },
    {
        "id": "CVE-2022-49894-d0924398",
        "signature_type": "Line",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a90accb358ae33ea982a35595573f7a045993f8b",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "116096487586774575592447200052644284226",
                "294851709607627824392127745382629423184",
                "202098278793193884605262936899086929317"
            ]
        },
        "signature_version": "v1",
        "deprecated": false,
        "target": {
            "file": "drivers/cxl/core/region.c"
        }
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.0.0
Fixed
6.0.8