VDB

CVE-2024-40945

CVE-2024-40945 PUBLISHED

iommu: Return right value in iommu_sva_bind_device()

Reported by linux · Published July 12, 2024

In the Linux kernel, the following vulnerability has been resolved: iommu: Return right value in iommu_sva_bind_device() iommu_sva_bind_device() should return either a sva bond handle or an ERR_PTR 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 iommu_sva_bind_device() only returns NULL when the kernel is not configured with CONFIG_IOMMU_SVA. In this case, iommu_dev_enable_feature(dev, IOMMU_DEV_FEAT_SVA) will return an error, and the device drivers won't call iommu_sva_bind_device() at all.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
kernelAmazon Linux6.1.129-138.220.amzn2023
kernel-libbpf-staticAmazon Linux6.1.129-138.220.amzn2023
bpftoolAmazon Linux6.1.129-138.220.amzn2023
kernel-headersAmazon Linux6.1.129-138.220.amzn2023
LinuxLinuxcf34f8f66982a36e5cba0d05781b21ec9606b91e, 89e8a2366e3bce584b6c01549d5019c5cda1205e, 7388ae6f26c0ba95f70cc96bf9c5d5cb06c908b6, 61a96da9649a6b6a1a5d5bde9374b045fdb5c12e, 5.2

Affected products

VendorProductVersions
LinuxLinux26b25a2b98e45aeb40eedcedc586ad5034cbd984, 26b25a2b98e45aeb40eedcedc586ad5034cbd984, 26b25a2b98e45aeb40eedcedc586ad5034cbd984
LinuxLinux5.2, 0, 5.4.279
amazon:2023kernel0
amazon:2023kernel-libbpf-static0
amazon:2023bpftool0
amazon:2023kernel-headers0
LinuxLinux6.10, 6.9.6, 6.6.35
amazon:2023python3-perf0
amazon:2023kernel-libbpf0
amazon:2023kernel-modules-extra-common0
amazon:2023kernel-libbpf-devel0
amazon:2023perf0
amazon:2023kernel-tools-devel0
amazon:2023kernel-modules-extra0
linuxlinux_kernel5.2, 5.2, 5.2
amazon:2023kernel-livepatch-6.1.129-138.2200
SiemensSIMATIC S7-1500 TM MFP - GNU/Linux subsystem0
SiemensRUGGEDCOM RST2428P0
SiemensSCALANCE XC-300/XR-300/XC-400/XR-500WG/XR-500 family0
amazon:2023kernel-tools0

…and 2 more

Timeline

  • Jul 12, 2024 CVE Published
  • Jul 13, 2024 EPSS Score (30 in total, the first dated here)
  • Oct 4, 2024 Coalition ESS Score (9 in total, the first dated here)
  • Jan 7, 2026 Security Advisory (271 in total, the first dated here)
  • May 28, 2026 Distribution Patch (174 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2024-40945
vulnetix vdb fixes CVE-2024-40945

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-40945/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›