Vulnerability · Published Aug 21, 2024 · Assigned by Linux
CVE-2023-52910iommu/iova: Fix alloc iova overflows issue
High 8.8
In plain English
A high-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: iommu/iova: Fix alloc iova overflows issue In __alloc_and_insert_iova_range, there is an issue that retry_pfn overflows. The value of iovad->anchor.pfn_hi is ~0UL, then when iovad->cached_node is iovad->anchor, curr_iova->pfn_hi + 1 will overflow. As a result, if the retry logic is executed, low_pfn is updated to 0, and then new_pfn < low_pfn returns false to make the allocation successful. This issue occurs in the following two situations: 1. The first iova size exceeds the domain size. When initializing iova domain, iovad->cached_node is assigned as iovad->anchor. For example, the iova domain size is 10M, start_pfn is 0x1_F000_0000, and the iova size allocated for the first time is 11M. The following is the log information, new->pfn_lo is smaller than iovad->cached_node. Example log as follows: [ 223.798112][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range start_pfn:0x1f0000,retry_pfn:0x0,size:0xb00,limit_pfn:0x1f0a00 [ 223.799590][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range success start_pfn:0x1f0000,new->pfn_lo:0x1efe00,new->pfn_hi:0x1f08ff 2. The node with the largest iova->pfn_lo value in the iova domain is deleted, iovad->cached_node will be updated to iovad->anchor, and then the alloc iova size exceeds the maximum iova size that can be allocated in the domain. After judging that retry_pfn is less than limit_pfn, call retry_pfn+1 to fix the overflow issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.1.7-1 | DEBIAN-CVE-2023-52910 |
| Debian:13 | linux | 6.1.7-1 | DEBIAN-CVE-2023-52910 |
| Debian:14 | linux | 6.1.7-1 | DEBIAN-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux | 5.15.0-70.77 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1034.38 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1036.43 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1036.43.1 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1032.40 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1031.36 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1018.23 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1028.31 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1028.33 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1031.36 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-70.77 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1023.23 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1033.39 | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1027.29 | UBUNTU-CVE-2023-52910 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2023-52910 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2023-52910 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 4e89dce725213d3d0b0475211b500eda4ef4bf2f – before c929a230c84441e400c32e7b7b4ab763711fb63e4e89dce725213d3d0b0475211b500eda4ef4bf2f – before 61cbf790e7329ed78877560be7136f0b911bba7f4e89dce725213d3d0b0475211b500eda4ef4bf2f – before dcdb3ba7e2a8caae7bfefd603bc22fd0ce9a389c |
| Linux | Linux | 5.11 |