{"id":"CVE-2022-50721","state":"PUBLISHED","title":"dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg","description":"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.","publishedAt":"2025-12-24T12:22:44.080Z","updatedAt":"2026-05-11T19:24:13.986Z","severity":null,"assigner":"Linux","products":["Linux Linux"],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f","status":"affected","lessThan":"5653bd0200944e5803fa8e32dc36aa49931312f9","versionType":"git"},{"version":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f","status":"affected","lessThan":"9a041174c58a226e713f6cebd41eccec7a5cfa72","versionType":"git"},{"version":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f","status":"affected","lessThan":"b9d2140c3badf4107973ad77c5a0ec3075705c85","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/qcom/qcom_adm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.19.17","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0.3","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/qcom/qcom_adm.c"]}],"references":["https://git.kernel.org/stable/c/5653bd0200944e5803fa8e32dc36aa49931312f9","https://git.kernel.org/stable/c/9a041174c58a226e713f6cebd41eccec7a5cfa72","https://git.kernel.org/stable/c/b9d2140c3badf4107973ad77c5a0ec3075705c85"],"weaknesses":[],"ingestedAt":"2026-10-29T20:05:26.763Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2022/50xxx/CVE-2022-50721.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2022-50721","state":"PUBLISHED","datePublished":"2025-12-24T12:22:44.080Z","dateUpdated":"2026-05-11T19:24:13.986Z","assignerShortName":"Linux","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateReserved":"2025-12-24T12:20:40.329Z"},"containers":{"cna":{"title":"dmaengine: qcom-adm: fix wrong calling convention for prep_slave_sg","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f","status":"affected","lessThan":"5653bd0200944e5803fa8e32dc36aa49931312f9","versionType":"git"},{"version":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f","status":"affected","lessThan":"9a041174c58a226e713f6cebd41eccec7a5cfa72","versionType":"git"},{"version":"5c9f8c2dbdbe53818bcde6aa6695e1331e5f841f","status":"affected","lessThan":"b9d2140c3badf4107973ad77c5a0ec3075705c85","versionType":"git"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/qcom/qcom_adm.c"]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"5.11","status":"affected"},{"version":"0","status":"unaffected","lessThan":"5.11","versionType":"semver"},{"version":"5.19.17","status":"unaffected","lessThanOrEqual":"5.19.*","versionType":"semver"},{"version":"6.0.3","status":"unaffected","lessThanOrEqual":"6.0.*","versionType":"semver"},{"version":"6.1","status":"unaffected","lessThanOrEqual":"*","versionType":"original_commit_for_fix"}],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["drivers/dma/qcom/qcom_adm.c"]}],"references":[{"url":"https://git.kernel.org/stable/c/5653bd0200944e5803fa8e32dc36aa49931312f9"},{"url":"https://git.kernel.org/stable/c/9a041174c58a226e713f6cebd41eccec7a5cfa72"},{"url":"https://git.kernel.org/stable/c/b9d2140c3badf4107973ad77c5a0ec3075705c85"}],"providerMetadata":{"shortName":"Linux","orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","dateUpdated":"2026-05-11T19:24:13.986Z"},"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"5.19.17"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.0.3"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.11","versionEndExcluding":"6.1"}]}]}],"x_generator":{"engine":"bippy-1.2.0"}}}}}