CVE-2022-50774

Severity CVSS v4.0:
Pending analysis
Type:
Unavailable / Other
Publication date:
24/12/2025
Last modified:
24/12/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> crypto: qat - fix DMA transfer direction<br /> <br /> When CONFIG_DMA_API_DEBUG is selected, while running the crypto self<br /> test on the QAT crypto algorithms, the function add_dma_entry() reports<br /> a warning similar to the one below, saying that overlapping mappings<br /> are not supported. This occurs in tests where the input and the output<br /> scatter list point to the same buffers (i.e. two different scatter lists<br /> which point to the same chunks of memory).<br /> <br /> The logic that implements the mapping uses the flag DMA_BIDIRECTIONAL<br /> for both the input and the output scatter lists which leads to<br /> overlapped write mappings. These are not supported by the DMA layer.<br /> <br /> Fix by specifying the correct DMA transfer directions when mapping<br /> buffers. For in-place operations where the input scatter list<br /> matches the output scatter list, buffers are mapped once with<br /> DMA_BIDIRECTIONAL, otherwise input buffers are mapped using the flag<br /> DMA_TO_DEVICE and output buffers are mapped with DMA_FROM_DEVICE.<br /> Overlapping a read mapping with a write mapping is a valid case in<br /> dma-coherent devices like QAT.<br /> The function that frees and unmaps the buffers, qat_alg_free_bufl()<br /> has been changed accordingly to the changes to the mapping function.<br /> <br /> DMA-API: 4xxx 0000:06:00.0: cacheline tracking EEXIST, overlapping mappings aren&amp;#39;t supported<br /> WARNING: CPU: 53 PID: 4362 at kernel/dma/debug.c:570 add_dma_entry+0x1e9/0x270<br /> ...<br /> Call Trace:<br /> dma_map_page_attrs+0x82/0x2d0<br /> ? preempt_count_add+0x6a/0xa0<br /> qat_alg_sgl_to_bufl+0x45b/0x990 [intel_qat]<br /> qat_alg_aead_dec+0x71/0x250 [intel_qat]<br /> crypto_aead_decrypt+0x3d/0x70<br /> test_aead_vec_cfg+0x649/0x810<br /> ? number+0x310/0x3a0<br /> ? vsnprintf+0x2a3/0x550<br /> ? scnprintf+0x42/0x70<br /> ? valid_sg_divisions.constprop.0+0x86/0xa0<br /> ? test_aead_vec+0xdf/0x120<br /> test_aead_vec+0xdf/0x120<br /> alg_test_aead+0x185/0x400<br /> alg_test+0x3d8/0x500<br /> ? crypto_acomp_scomp_free_ctx+0x30/0x30<br /> ? __schedule+0x32a/0x12a0<br /> ? ttwu_queue_wakelist+0xbf/0x110<br /> ? _raw_spin_unlock_irqrestore+0x23/0x40<br /> ? try_to_wake_up+0x83/0x570<br /> ? _raw_spin_unlock_irqrestore+0x23/0x40<br /> ? __set_cpus_allowed_ptr_locked+0xea/0x1b0<br /> ? crypto_acomp_scomp_free_ctx+0x30/0x30<br /> cryptomgr_test+0x27/0x50<br /> kthread+0xe6/0x110<br /> ? kthread_complete_and_exit+0x20/0x20<br /> ret_from_fork+0x1f/0x30

Impact