CVE-2022-50774

Source
https://cve.org/CVERecord?id=CVE-2022-50774
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50774.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50774
Downstream
Related
Published
2025-12-24T13:06:04.391Z
Modified
2026-03-20T11:47:36.638663Z
Summary
crypto: qat - fix DMA transfer direction
Details

In the Linux kernel, the following vulnerability has been resolved:

crypto: qat - fix DMA transfer direction

When CONFIGDMAAPIDEBUG is selected, while running the crypto self test on the QAT crypto algorithms, the function adddma_entry() reports a warning similar to the one below, saying that overlapping mappings are not supported. This occurs in tests where the input and the output scatter list point to the same buffers (i.e. two different scatter lists which point to the same chunks of memory).

The logic that implements the mapping uses the flag DMA_BIDIRECTIONAL for both the input and the output scatter lists which leads to overlapped write mappings. These are not supported by the DMA layer.

Fix by specifying the correct DMA transfer directions when mapping buffers. For in-place operations where the input scatter list matches the output scatter list, buffers are mapped once with DMABIDIRECTIONAL, otherwise input buffers are mapped using the flag DMATODEVICE and output buffers are mapped with DMAFROMDEVICE. Overlapping a read mapping with a write mapping is a valid case in dma-coherent devices like QAT. The function that frees and unmaps the buffers, qatalgfreebufl() has been changed accordingly to the changes to the mapping function.

DMA-API: 4xxx 0000:06:00.0: cacheline tracking EEXIST, overlapping mappings aren't supported WARNING: CPU: 53 PID: 4362 at kernel/dma/debug.c:570 adddmaentry+0x1e9/0x270 ... Call Trace: dmamappageattrs+0x82/0x2d0 ? preemptcountadd+0x6a/0xa0 qatalgsgltobufl+0x45b/0x990 [intelqat] qatalgaeaddec+0x71/0x250 [intelqat] cryptoaeaddecrypt+0x3d/0x70 testaeadveccfg+0x649/0x810 ? number+0x310/0x3a0 ? vsnprintf+0x2a3/0x550 ? scnprintf+0x42/0x70 ? validsgdivisions.constprop.0+0x86/0xa0 ? testaeadvec+0xdf/0x120 testaeadvec+0xdf/0x120 algtestaead+0x185/0x400 algtest+0x3d8/0x500 ? cryptoacompscompfreectx+0x30/0x30 ? __schedule+0x32a/0x12a0 ? ttwuqueuewakelist+0xbf/0x110 ? rawspin_unlockirqrestore+0x23/0x40 ? trytowakeup+0x83/0x570 ? rawspinunlockirqrestore+0x23/0x40 ? __setcpusallowedptrlocked+0xea/0x1b0 ? cryptoacompscompfreectx+0x30/0x30 cryptomgrtest+0x27/0x50 kthread+0xe6/0x110 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x1f/0x30

Database specific
{
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50774.json"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
d370cec3219490656d72f5ae6e5df32c113c5a44
Fixed
426d5bc089e7731e36b514d1beca19e777a2d653
Fixed
1f1ab76e251521bd2fa5244473efcf663792745d
Fixed
429348d4f675e9eb418d0829064c4d7d06bd66a3
Fixed
c4c9d9edf4848aed89516b23b88950b194beff6a
Fixed
cf5bb835b7c8a5fee7f26455099cca7feb57f5e9

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50774.json"

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
3.17.0
Fixed
5.10.150
Type
ECOSYSTEM
Events
Introduced
5.11.0
Fixed
5.15.75
Type
ECOSYSTEM
Events
Introduced
5.16.0
Fixed
5.19.17
Type
ECOSYSTEM
Events
Introduced
5.20.0
Fixed
6.0.3

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50774.json"