CVE-2022-50774
DMA Mapping Logic Flaw in Linux QAT Crypto Causes Overlapping Mappings
Publication date: 2025-12-24
Last updated on: 2025-12-24
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| intel | qat | * |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-UNKNOWN |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability occurs in the Linux kernel's Intel QAT crypto driver when the DMA transfer directions are incorrectly specified during buffer mapping. Specifically, when the input and output scatter lists point to the same memory buffers, the driver uses the DMA_BIDIRECTIONAL flag for both, causing overlapping write mappings that are not supported by the DMA layer. This leads to warnings and potential issues during crypto self tests. The fix involves correctly specifying DMA transfer directions: using DMA_BIDIRECTIONAL for in-place operations where input and output buffers are the same, and using DMA_TO_DEVICE for input buffers and DMA_FROM_DEVICE for output buffers otherwise.
How can this vulnerability impact me? :
This vulnerability can cause warnings and errors during cryptographic operations using the Intel QAT driver in the Linux kernel, potentially leading to failed crypto self tests or unstable behavior when processing data buffers that overlap. It may affect the reliability and correctness of cryptographic operations relying on the QAT hardware acceleration.
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by enabling CONFIG_DMA_API_DEBUG in the Linux kernel and running the crypto self test on the QAT crypto algorithms. When the issue occurs, the kernel logs a warning about overlapping mappings not being supported, similar to: 'DMA-API: 4xxx 0000:06:00.0: cacheline tracking EEXIST, overlapping mappings aren't supported' along with a stack trace involving add_dma_entry(). You can check the kernel logs (e.g., using 'dmesg' or 'journalctl -k') for such warnings. Running the command 'echo 1 > /sys/kernel/debug/dma_debug' may enable DMA debug messages if supported. Also, running the crypto self test for QAT modules can be done via the kernel self test framework or specific test utilities if available.
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, update the Linux kernel to a version where the fix is applied. The fix involves correcting the DMA transfer direction flags in the QAT crypto algorithms so that buffers are mapped with the correct DMA direction flags (DMA_BIDIRECTIONAL for in-place operations, DMA_TO_DEVICE for input buffers, and DMA_FROM_DEVICE for output buffers). This prevents overlapping write mappings that cause the warnings and potential issues. Until the update is applied, avoid running the crypto self tests with CONFIG_DMA_API_DEBUG enabled on QAT algorithms to prevent the warnings.