CVE-2023-52910

See a problem?
Source
https://nvd.nist.gov/vuln/detail/CVE-2023-52910
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-52910.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2023-52910
Related
Published
2024-08-21T07:15:06Z
Modified
2024-09-18T01:00:19Z
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
[none]
Details

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

iommu/iova: Fix alloc iova overflows issue

In _allocandinsertiovarange, there is an issue that retrypfn overflows. The value of iovad->anchor.pfnhi is ~0UL, then when iovad->cachednode is iovad->anchor, curriova->pfnhi + 1 will overflow. As a result, if the retry logic is executed, lowpfn is updated to 0, and then newpfn < 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->cachednode is assigned as iovad->anchor. For example, the iova domain size is 10M, startpfn is 0x1F0000000, and the iova size allocated for the first time is 11M. The following is the log information, new->pfnlo is smaller than iovad->cachednode.

Example log as follows: [ 223.798112][T1705487] sh: [name:iova&]allocandinsertiovarange startpfn:0x1f0000,retrypfn:0x0,size:0xb00,limitpfn:0x1f0a00 [ 223.799590][T1705487] sh: [name:iova&]allocandinsertiovarange success startpfn:0x1f0000,new->pfnlo:0x1efe00,new->pfnhi:0x1f08ff

  1. The node with the largest iova->pfnlo value in the iova domain is deleted, iovad->cachednode 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 retrypfn is less than limitpfn, call retry_pfn+1 to fix the overflow issue.

References

Affected packages

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.1.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.1.7-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}