CVE-2024-56760

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-56760
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-56760.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-56760
Downstream
Related
Published
2025-01-06T16:20:40Z
Modified
2025-10-17T19:30:27.629421Z
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
PCI/MSI: Handle lack of irqdomain gracefully
Details

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

PCI/MSI: Handle lack of irqdomain gracefully

Alexandre observed a warning emitted from pcimsisetupmsiirqs() on a RISCV platform which does not provide PCI/MSI support:

WARNING: CPU: 1 PID: 1 at drivers/pci/msi/msi.h:121 pcimsisetupmsiirqs+0x2c/0x32 _pcienablemsixrange+0x30c/0x596 pcimsisetupmsiirqs+0x2c/0x32 pciallocirqvectorsaffinity+0xb8/0xe2

RISCV uses hierarchical interrupt domains and correctly does not implement the legacy fallback. The warning triggers from the legacy fallback stub.

That warning is bogus as the PCI/MSI layer knows whether a PCI/MSI parent domain is associated with the device or not. There is a check for MSI-X, which has a legacy assumption. But that legacy fallback assumption is only valid when legacy support is enabled, but otherwise the check should simply return -ENOTSUPP.

Loongarch tripped over the same problem and blindly enabled legacy support without implementing the legacy fallbacks. There are weak implementations which return an error, so the problem was papered over.

Correct pcimsidomain_supports() to evaluate the legacy mode and add the missing supported check into the MSI enable path to complete it.

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
d2a463b297415ca6dd4d60bb1c867dd7c931587b
Fixed
b1f7476e07b93d65a1a3643dcb4a7bed80d4328d
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d2a463b297415ca6dd4d60bb1c867dd7c931587b
Fixed
aed157301c659a48f5564cc4568cf0e5c8831af0
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d2a463b297415ca6dd4d60bb1c867dd7c931587b
Fixed
a60b990798eb17433d0283788280422b1bd94b18

Affected versions

v6.*

v6.1
v6.1-rc6
v6.1-rc7
v6.1-rc8
v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.2
v6.12.3
v6.12.4
v6.12.5
v6.12.6
v6.12.7
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.2
v6.2-rc1
v6.2-rc2
v6.2-rc3
v6.2-rc4
v6.2-rc5
v6.2-rc6
v6.2-rc7
v6.2-rc8
v6.3
v6.3-rc1
v6.3-rc2
v6.3-rc3
v6.3-rc4
v6.3-rc5
v6.3-rc6
v6.3-rc7
v6.4
v6.4-rc1
v6.4-rc2
v6.4-rc3
v6.4-rc4
v6.4-rc5
v6.4-rc6
v6.4-rc7
v6.5
v6.5-rc1
v6.5-rc2
v6.5-rc3
v6.5-rc4
v6.5-rc5
v6.5-rc6
v6.5-rc7
v6.6
v6.6-rc1
v6.6-rc2
v6.6-rc3
v6.6-rc4
v6.6-rc5
v6.6-rc6
v6.6-rc7
v6.6.1
v6.6.10
v6.6.11
v6.6.12
v6.6.13
v6.6.14
v6.6.15
v6.6.16
v6.6.17
v6.6.18
v6.6.19
v6.6.2
v6.6.20
v6.6.21
v6.6.22
v6.6.23
v6.6.24
v6.6.25
v6.6.26
v6.6.27
v6.6.28
v6.6.29
v6.6.3
v6.6.30
v6.6.31
v6.6.32
v6.6.33
v6.6.34
v6.6.35
v6.6.36
v6.6.37
v6.6.38
v6.6.39
v6.6.4
v6.6.40
v6.6.41
v6.6.42
v6.6.43
v6.6.44
v6.6.45
v6.6.46
v6.6.47
v6.6.48
v6.6.49
v6.6.5
v6.6.50
v6.6.51
v6.6.52
v6.6.53
v6.6.54
v6.6.55
v6.6.56
v6.6.57
v6.6.58
v6.6.59
v6.6.6
v6.6.60
v6.6.61
v6.6.62
v6.6.63
v6.6.64
v6.6.65
v6.6.66
v6.6.67
v6.6.68
v6.6.7
v6.6.8
v6.6.9
v6.7
v6.7-rc1
v6.7-rc2
v6.7-rc3
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7

Database specific

vanir_signatures

[
    {
        "signature_type": "Line",
        "id": "CVE-2024-56760-27bb3023",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a60b990798eb17433d0283788280422b1bd94b18",
        "signature_version": "v1",
        "target": {
            "file": "drivers/pci/msi/irqdomain.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "169429858908435369990817935238802072304",
                "168368840154203645371181988595508887842",
                "332941340575659710554163303860566224572",
                "139822963311291031939064973835051775646",
                "104890098510954325207763522376898317420"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-56760-36fa7564",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aed157301c659a48f5564cc4568cf0e5c8831af0",
        "signature_version": "v1",
        "target": {
            "file": "drivers/pci/msi/irqdomain.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "169429858908435369990817935238802072304",
                "168368840154203645371181988595508887842",
                "332941340575659710554163303860566224572",
                "139822963311291031939064973835051775646",
                "104890098510954325207763522376898317420"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-56760-568f7b97",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aed157301c659a48f5564cc4568cf0e5c8831af0",
        "signature_version": "v1",
        "target": {
            "file": "drivers/pci/msi/msi.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "251638650594557121235285830291854944763",
                "301432310021249275655662952528675718762",
                "21145311497509868909395509653778041319"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-56760-6a63c23b",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aed157301c659a48f5564cc4568cf0e5c8831af0",
        "signature_version": "v1",
        "target": {
            "function": "__pci_enable_msi_range",
            "file": "drivers/pci/msi/msi.c"
        },
        "digest": {
            "function_hash": "187800319608876795943270156818930466117",
            "length": 891.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-56760-9e4b6c74",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a60b990798eb17433d0283788280422b1bd94b18",
        "signature_version": "v1",
        "target": {
            "function": "pci_msi_domain_supports",
            "file": "drivers/pci/msi/irqdomain.c"
        },
        "digest": {
            "function_hash": "8325249552233370630891870353194468269",
            "length": 392.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-56760-aa5f32ff",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a60b990798eb17433d0283788280422b1bd94b18",
        "signature_version": "v1",
        "target": {
            "function": "__pci_enable_msi_range",
            "file": "drivers/pci/msi/msi.c"
        },
        "digest": {
            "function_hash": "187800319608876795943270156818930466117",
            "length": 891.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-56760-aadb7540",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1f7476e07b93d65a1a3643dcb4a7bed80d4328d",
        "signature_version": "v1",
        "target": {
            "file": "drivers/pci/msi/irqdomain.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "169429858908435369990817935238802072304",
                "168368840154203645371181988595508887842",
                "332941340575659710554163303860566224572",
                "139822963311291031939064973835051775646",
                "104890098510954325207763522376898317420"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-56760-bfa80e29",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1f7476e07b93d65a1a3643dcb4a7bed80d4328d",
        "signature_version": "v1",
        "target": {
            "function": "pci_msi_domain_supports",
            "file": "drivers/pci/msi/irqdomain.c"
        },
        "digest": {
            "function_hash": "8325249552233370630891870353194468269",
            "length": 392.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-56760-cf72d6e8",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@aed157301c659a48f5564cc4568cf0e5c8831af0",
        "signature_version": "v1",
        "target": {
            "function": "pci_msi_domain_supports",
            "file": "drivers/pci/msi/irqdomain.c"
        },
        "digest": {
            "function_hash": "8325249552233370630891870353194468269",
            "length": 392.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Function",
        "id": "CVE-2024-56760-dca60403",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1f7476e07b93d65a1a3643dcb4a7bed80d4328d",
        "signature_version": "v1",
        "target": {
            "function": "__pci_enable_msi_range",
            "file": "drivers/pci/msi/msi.c"
        },
        "digest": {
            "function_hash": "187800319608876795943270156818930466117",
            "length": 891.0
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-56760-e67e8f6d",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1f7476e07b93d65a1a3643dcb4a7bed80d4328d",
        "signature_version": "v1",
        "target": {
            "file": "drivers/pci/msi/msi.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "251638650594557121235285830291854944763",
                "301432310021249275655662952528675718762",
                "21145311497509868909395509653778041319"
            ]
        },
        "deprecated": false
    },
    {
        "signature_type": "Line",
        "id": "CVE-2024-56760-ea859254",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a60b990798eb17433d0283788280422b1bd94b18",
        "signature_version": "v1",
        "target": {
            "file": "drivers/pci/msi/msi.c"
        },
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "251638650594557121235285830291854944763",
                "301432310021249275655662952528675718762",
                "21145311497509868909395509653778041319"
            ]
        },
        "deprecated": false
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.69
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.12.8