ata: libahci: clear PxCLBU and PxFBU for AHCI_HFLAG_32BIT_ONLY
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ c7a42156d99bcea7f8173ba7a6034bbaa2ecb77c · < b691a3e244278362e552439d6d3ee5a5d3703488| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
ata: libahci: clear PxCLBU and PxFBU for AHCI_HFLAG_32BIT_ONLY
A user reported that commit 105c42566a55 ("ata: ahci: force 32-bit DMA for JMicron JMB582/JMB585") made the JMicron JMB585 unusable on his board.
The failure is seen as soon as the ahci driver is probed, and booting with iommu=off does not solve the problem.
Looking at the AHCI specification, PxCLBU and PxFBU are both read only '0' for HBAs that do not support 64-bit addressing.
For HBAs that do support 64-bit addressing, the registers are read write, with a reset value that is Implementation Specific.
When using the AHCI_HFLAG_32BIT_ONLY flag, the HBA does support 64-bit addressing, and a 32-bit DMA mask is set by simply clearing HOST_CAP_64. Thus, in this case, we need to explicitly clear the registers to 0.
From the CVE record · Linux
The Linux kernel’s libahci driver can leave 64-bit address registers uncleared when using the AHCI_HFLAG_32BIT_ONLY flag. A reported JMicron JMB585 board becomes unusable as soon as the ahci driver is probed; the input does not describe an attacker or an exploitation path.
Engineers running Linux kernels with JMicron JMB585 controllers should check their systems; affected versions are not specified.