{"id":"CVE-2023-52910","published":"2024-08-21T06:10:51Z","modified":"2026-08-05T09:11:57Z","title":"iommu/iova: Fix alloc iova overflows issue","vendor":"Linux","product":"Linux","tier":"tail","description":{"text":"In the Linux kernel, the following vulnerability has been resolved:\n\niommu/iova: Fix alloc iova overflows issue\n\nIn __alloc_and_insert_iova_range, there is an issue that retry_pfn\noverflows. The value of iovad->anchor.pfn_hi is ~0UL, then when\niovad->cached_node is iovad->anchor, curr_iova->pfn_hi + 1 will\noverflow. As a result, if the retry logic is executed, low_pfn is\nupdated to 0, and then new_pfn < low_pfn returns false to make the\nallocation successful.\n\nThis issue occurs in the following two situations:\n1. The first iova size exceeds the domain size. When initializing\niova domain, iovad->cached_node is assigned as iovad->anchor. For\nexample, the iova domain size is 10M, start_pfn is 0x1_F000_0000,\nand the iova size allocated for the first time is 11M. The\nfollowing is the log information, new->pfn_lo is smaller than\niovad->cached_node.\n\nExample log as follows:\n[  223.798112][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range\nstart_pfn:0x1f0000,retry_pfn:0x0,size:0xb00,limit_pfn:0x1f0a00\n[  223.799590][T1705487] sh: [name:iova&]__alloc_and_insert_iova_range\nsuccess start_pfn:0x1f0000,new->pfn_lo:0x1efe00,new->pfn_hi:0x1f08ff\n\n2. The node with the largest iova->pfn_lo value in the iova domain\nis deleted, iovad->cached_node will be updated to iovad->anchor,\nand then the alloc iova size exceeds the maximum iova size that can\nbe allocated in the domain.\n\nAfter judging that retry_pfn is less than limit_pfn, call retry_pfn+1\nto fix the overflow issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.8,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00326,"percentile":0.18123,"provenance":"source"},"cwes":[],"references":[{"url":"https://git.kernel.org/stable/c/c929a230c84441e400c32e7b7b4ab763711fb63e","tags":[]},{"url":"https://git.kernel.org/stable/c/61cbf790e7329ed78877560be7136f0b911bba7f","tags":[]},{"url":"https://git.kernel.org/stable/c/dcdb3ba7e2a8caae7bfefd603bc22fd0ce9a389c","tags":[]}],"priority":{"score":9.8,"factors":[{"name":"EPSS percentile","points":3.62},{"name":"CVSS severity","points":6.16}]},"vendorSlug":"linux","affectedVersions":[{"vendor":"Linux","product":"Linux","versions":[">= 4e89dce725213d3d0b0475211b500eda4ef4bf2f, < c929a230c84441e400c32e7b7b4ab763711fb63e",">= 4e89dce725213d3d0b0475211b500eda4ef4bf2f, < 61cbf790e7329ed78877560be7136f0b911bba7f",">= 4e89dce725213d3d0b0475211b500eda4ef4bf2f, < dcdb3ba7e2a8caae7bfefd603bc22fd0ce9a389c"]},{"vendor":"Linux","product":"Linux","versions":["5.11"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-09-10T15:34:52.014408Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2023-59621","exploited":false,"provenance":"source"}}