# CVE-2022-50145: dmaengine: sf-pdma: Add multithread support for a DMA channel

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-06-18T11:03:06.312Z
- **Modified:** 2026-08-05T08:57:32.722Z

## Who should check

- Anyone running Linux \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< b9b4992f897be9b0b9e3a3b956cab6b75ccc3f11; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< 5ab2782c944e324008ef5d658f2494a9f0e3c5ac; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< 4c7350b1dd8a192af844de32fc99b9e34c876fda; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< a93b3f1e11971a91b6441b6d47488f4492cc113f; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< b2cc5c465c2cb8ab697c3fd6583c614e3f6cfbcc
- Anyone running Linux 5.5

## Description

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

dmaengine: sf-pdma: Add multithread support for a DMA channel

When we get a DMA channel and try to use it in multiple threads it
will cause oops and hanging the system.

% echo 64 \> /sys/module/dmatest/parameters/threads\_per\_chan
% echo 10000 \> /sys/module/dmatest/parameters/iterations
% echo 1 \> /sys/module/dmatest/parameters/run
\[   89.480664\] Unable to handle kernel NULL pointer dereference at virtual
               address 00000000000000a0
\[   89.488725\] Oops \[\#1\]
\[   89.494708\] CPU: 2 PID: 1008 Comm: dma0chan0-copy0 Not tainted
               5.17.0-rc5
\[   89.509385\] epc : vchan\_find\_desc+0x32/0x46
\[   89.513553\]  ra : sf\_pdma\_tx\_status+0xca/0xd6

This happens because of data race. Each thread rewrite channels's
descriptor as soon as device\_prep\_dma\_memcpy() is called. It leads to the
situation when the driver thinks that it uses right descriptor that
actually is freed or substituted for other one.

With current fixes a descriptor changes its value only when it has
been used. A new descriptor is acquired from vc-\>desc\_issued queue that
is already filled with descriptors that are ready to be sent. Threads
have no direct access to DMA channel descriptor. Now it is just possible
to queue a descriptor for further processing.

## Affected and fixed versions

- Linux: \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< b9b4992f897be9b0b9e3a3b956cab6b75ccc3f11; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< 5ab2782c944e324008ef5d658f2494a9f0e3c5ac; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< 4c7350b1dd8a192af844de32fc99b9e34c876fda; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< a93b3f1e11971a91b6441b6d47488f4492cc113f; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< b2cc5c465c2cb8ab697c3fd6583c614e3f6cfbcc (cvelist)
- Linux: 5.5 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50145. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50145.md
Affected: Linux >= 6973886ad58e6b4988813331abb76ae0b364a9c2, < b9b4992f897be9b0b9e3a3b956cab6b75ccc3f11; >= 6973886ad58e6b4988813331abb76ae0b364a9c2, < 5ab2782c944e324008ef5d658f2494a9f0e3c5ac; >= 6973886ad58e6b4988813331abb76ae0b364a9c2, < 4c7350b1dd8a192af844de32fc99b9e34c876fda; >= 6973886ad58e6b498881333…
Fixed in: Linux 5ab2782c944e324008ef5d658f2494a9f0e3c5ac, Linux 4c7350b1dd8a192af844de32fc99b9e34c876fda

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50145 being exploited?

There is no confirmed exploitation: CVE-2022-50145 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.30% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50145?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50145?

Linux \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< b9b4992f897be9b0b9e3a3b956cab6b75ccc3f11; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< 5ab2782c944e324008ef5d658f2494a9f0e3c5ac; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< 4c7350b1dd8a192af844de32fc99b9e34c876fda; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< a93b3f1e11971a91b6441b6d47488f4492cc113f; \>= 6973886ad58e6b4988813331abb76ae0b364a9c2, \< b2cc5c465c2cb8ab697c3fd6583c614e3f6cfbcc; Linux 5.5.

### Is there a fix for CVE-2022-50145?

Yes. Fixed in Linux 5ab2782c944e324008ef5d658f2494a9f0e3c5ac, Linux 4c7350b1dd8a192af844de32fc99b9e34c876fda. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2022-50145?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b9b4992f897be9b0b9e3a3b956cab6b75ccc3f11>
- patch: <https://git.kernel.org/stable/c/5ab2782c944e324008ef5d658f2494a9f0e3c5ac>
- patch: <https://git.kernel.org/stable/c/4c7350b1dd8a192af844de32fc99b9e34c876fda>
- patch: <https://git.kernel.org/stable/c/a93b3f1e11971a91b6441b6d47488f4492cc113f>
- patch: <https://git.kernel.org/stable/c/b2cc5c465c2cb8ab697c3fd6583c614e3f6cfbcc>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50145>

HTML: <https://flawdb.com/CVE-2022-50145> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50145>
