{"id":"CVE-2022-50721","summary":"dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg","details":"In the Linux kernel, the following vulnerability has been resolved:\n\ndmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg\n\nThe calling convention for pre_slave_sg is to return NULL on error and\nprovide an error log to the system. Qcom-adm instead provide error\npointer when an error occur. This indirectly cause kernel panic for\nexample for the nandc driver that checks only if the pointer returned by\ndevice_prep_slave_sg is not NULL. Returning an error pointer makes nandc\nthink the device_prep_slave_sg function correctly completed and makes\nthe kernel panics later in the code.\n\nWhile nandc is the one that makes the kernel crash, it was pointed out\nthat the real problem is qcom-adm not following calling convention for\nthat function.\n\nTo fix this, drop returning error pointer and return NULL with an error\nlog.","modified":"2026-03-20T12:22:37.268232Z","published":"2025-12-24T12:22:44.080Z","database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50721.json"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/5653bd0200944e5803fa8e32dc36aa49931312f9"},{"type":"WEB","url":"https://git.kernel.org/stable/c/9a041174c58a226e713f6cebd41eccec7a5cfa72"},{"type":"WEB","url":"https://git.kernel.org/stable/c/b9d2140c3badf4107973ad77c5a0ec3075705c85"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50721.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50721"},{"type":"PACKAGE","url":"https://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":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f"},{"fixed":"5653bd0200944e5803fa8e32dc36aa49931312f9"},{"fixed":"9a041174c58a226e713f6cebd41eccec7a5cfa72"},{"fixed":"b9d2140c3badf4107973ad77c5a0ec3075705c85"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50721.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.11.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-50721.json"}}],"schema_version":"1.7.5"}