CVE-2024-40945

Source
https://nvd.nist.gov/vuln/detail/CVE-2024-40945
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2024-40945.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2024-40945
Downstream
Related
Published
2024-07-12T12:25:19.164Z
Modified
2025-11-28T02:34:34.728217Z
Summary
iommu: Return right value in iommu_sva_bind_device()
Details

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

iommu: Return right value in iommusvabind_device()

iommusvabinddevice() should return either a sva bond handle or an ERRPTR value in error cases. Existing drivers (idxd and uacce) only check the return value with IS_ERR(). This could potentially lead to a kernel NULL pointer dereference issue if the function returns NULL instead of an error pointer.

In reality, this doesn't cause any problems because iommusvabinddevice() only returns NULL when the kernel is not configured with CONFIGIOMMUSVA. In this case, iommudevenablefeature(dev, IOMMUDEVFEATSVA) will return an error, and the device drivers won't call iommusvabinddevice() at all.

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/40xxx/CVE-2024-40945.json"
}
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
26b25a2b98e45aeb40eedcedc586ad5034cbd984
Fixed
700f564758882db7c039dfba9443fe762561a3f8
Fixed
cf34f8f66982a36e5cba0d05781b21ec9606b91e
Fixed
2973b8e7d127754de9013177c41c0b5547406998
Fixed
6325eab6c108fed27f60ff51852e3eac0ba23f3f
Fixed
7388ae6f26c0ba95f70cc96bf9c5d5cb06c908b6
Fixed
61a96da9649a6b6a1a5d5bde9374b045fdb5c12e
Fixed
89e8a2366e3bce584b6c01549d5019c5cda1205e

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
5.2.0
Fixed
5.4.279
Type
ECOSYSTEM
Events
Introduced
5.5.0
Fixed
5.10.221
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.162
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
6.1.129
Type
ECOSYSTEM
Events
Introduced
6.2.0
Fixed
6.6.35
Type
ECOSYSTEM
Events
Introduced
6.7.0
Fixed
6.9.6