dma-direct: return struct page from dma_direct_alloc_from_pool()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5b138c534fda57c2ebc1e6de72578aa1d70788a6 · < 94a04ad732c9f8b9554270fc4038a06737de5c22| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
dma-direct: return struct page from dma_direct_alloc_from_pool()
Commit 5b138c534fda ("dma-direct: factor out a dma_direct_alloc_from_pool helper") changed dma_direct_alloc_from_pool() to return the CPU address from dma_alloc_from_pool(). That fits dma_direct_alloc(), but dma_direct_alloc_pages() also uses the helper and expects a struct page *.
Fix this by making dma_direct_alloc_from_pool() return the struct page * again, and pass the CPU address back through an out-parameter for the dma_direct_alloc() caller.
From the CVE record · Linux
The dma_direct_alloc_from_pool() helper returns a CPU address, but dma_direct_alloc_pages() expects a struct page pointer. The input does not specify what an attacker could do or whether exploitation requires network access, authentication, local access, or user interaction.
Engineers running the Linux kernel should check whether their version includes the affected change; affected versions are not specified.