CVE-2022-50721
Unknown Unknown - Not Provided
Calling Convention Bug in Linux dmaengine Causes Kernel Panic

Publication date: 2025-12-24

Last updated on: 2025-12-24

Assigner: kernel.org

Description
In the Linux kernel, the following vulnerability has been resolved: dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg The calling convention for pre_slave_sg is to return NULL on error and provide an error log to the system. Qcom-adm instead provide error pointer when an error occur. This indirectly cause kernel panic for example for the nandc driver that checks only if the pointer returned by device_prep_slave_sg is not NULL. Returning an error pointer makes nandc think the device_prep_slave_sg function correctly completed and makes the kernel panics later in the code. While nandc is the one that makes the kernel crash, it was pointed out that the real problem is qcom-adm not following calling convention for that function. To fix this, drop returning error pointer and return NULL with an error log.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2025-12-24
Last Modified
2025-12-24
Generated
2026-05-07
AI Q&A
2025-12-24
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
linux linux_kernel *
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-UNKNOWN
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

This vulnerability is in the Linux kernel's dmaengine, specifically in the qcom-adm driver. The issue is that qcom-adm does not follow the correct calling convention for the function prep_slave_sg. Instead of returning NULL on error and logging the error, it returns an error pointer. This causes other drivers, like nandc, which only check if the pointer is not NULL, to mistakenly believe the function succeeded. This leads to a kernel panic later in the code. The fix is to have qcom-adm return NULL with an error log as per the correct convention.


How can this vulnerability impact me? :

This vulnerability can cause the Linux kernel to panic (crash) due to improper error handling in the qcom-adm driver. If a driver like nandc relies on the return value of prep_slave_sg and receives an error pointer instead of NULL, it may proceed incorrectly, leading to system instability or crashes.


What immediate steps should I take to mitigate this vulnerability?

Apply the patch that fixes the calling convention in the qcom-adm dmaengine driver to ensure that prep_slave_sg returns NULL on error instead of an error pointer. This prevents kernel panic caused by the nandc driver misinterpreting the return value. Until patched, avoid using affected drivers or kernel versions if possible.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart