Bug 2265793 (CVE-2023-52455) - CVE-2023-52455 kernel: iommu: Don't reserve 0-length IOVA region
Summary: CVE-2023-52455 kernel: iommu: Don't reserve 0-length IOVA region
Keywords:
Status: NEW
Alias: CVE-2023-52455
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2265805
Blocks: 2265790
TreeView+ depends on / blocked
 
Reported: 2024-02-24 11:20 UTC by Patrick Del Bello
Modified: 2024-09-04 14:06 UTC (History)
49 users (show)

Fixed In Version: kernel 6.8-rc1
Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the Linux kernel. When the bootloader/firmware does not set up the framebuffers, the address and size are 0 in the "iommu-addresses" property. If the IOVA region is reserved with a 0 length, it corrupts the IOVA rbtree with an entry that has pfn_hi < pfn_lo. If the intent is to use the display driver in the kernel without the framebuffer, it causes the display IOMMU mappings to fail, as an entire valid IOVA space is reserved when the address and length are passed as 0. An ideal solution would be for the firmware to remove the "iommu-addresses" property and the corresponding "memory-region" if the display is not present. The kernel should be able to handle this by checking the size of the IOVA region and skipping the IOVA reservation if its size is 0. Also, add a warning if the firmware is requesting a 0-length IOVA region reservation.
Clone Of:
Environment:
Last Closed:
Embargoed:


Attachments (Terms of Use)

Description Patrick Del Bello 2024-02-24 11:20:01 UTC
When the bootloader/firmware doesn't setup the framebuffers, their address and size are 0 in "iommu-addresses" property. If IOVA region is
reserved with 0 length, then it ends up corrupting the IOVA rbtree with an entry which has pfn_hi < pfn_lo.
If we intend to use display driver in kernel without framebuffer then it's causing the display IOMMU mappings to fail as entire valid IOVA
space is reserved when address and length are passed as 0. An ideal solution would be firmware removing the "iommu-addresses" property and corresponding "memory-region" if display is not present. But the kernel should be able to handle this by checking for size of IOVA region and skipping the IOVA reservation if size is 0. Also, add a warning if firmware is requesting 0-length IOVA region reservation.

Comment 1 Patrick Del Bello 2024-02-24 11:24:50 UTC
Created kernel tracking bugs for this issue:

Affects: fedora-all [bug 2265805]

Comment 3 Justin M. Forbes 2024-02-27 00:19:10 UTC
	Issue introduced in 6.3 with commit a5bf3cfce8cb and fixed in 6.6.14 with commit 98b8a550da83
	Issue introduced in 6.3 with commit a5bf3cfce8cb and fixed in 6.7.2 with commit 5e23e283910c
	Issue introduced in 6.3 with commit a5bf3cfce8cb and fixed in 6.8-rc1 with commit bb57f6705960

Comment 4 Justin M. Forbes 2024-02-27 00:19:35 UTC
This was fixed for Fedora with the 6.6.14 stable kernel updates.

Comment 7 Alex 2024-06-09 16:43:04 UTC
The result of automatic check (that is developed by Alexander Larkin) for this CVE-2023-52455 is: CHECK	Maybe valid. Check manually. with impact LOW (that is an approximation based on flags WARNONLY SIMPLEFIX IMPROVEONLY  ; these flags parsed automatically based on patch data). Such automatic check happens only for Low/Moderates (and only when not from reporter, but parsing already existing CVE). Highs always checked manually (I check it myself and then we check it again in Remediation team). In rare cases some of the Moderates could be increased to High later.


Note You need to log in before you can comment on or make changes to this bug.