{"schema_version":"1.9.0","id":"CVE-2022-50135","published":"2025-06-18T11:02:59.440Z","modified":"2026-08-12T03:51:20.544839901Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02321-1"],"summary":"RDMA/rxe: Fix BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/rxe: Fix BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup\n\nThe function rxe_create_qp calls rxe_qp_from_init. If some error\noccurs, the error handler of function rxe_qp_from_init will set\nboth scq and rcq to NULL.\n\nThen rxe_create_qp calls rxe_put to handle qp. In the end,\nrxe_qp_do_cleanup is called by rxe_put. rxe_qp_do_cleanup directly\naccesses scq and rcq before checking them. This will cause\nnull-ptr-deref error.\n\nThe call graph is as below:\n\nrxe_create_qp {\n  ...\n  rxe_qp_from_init {\n    ...\n  err1:\n    ...\n    qp->rcq = NULL;  <---rcq is set to NULL\n    qp->scq = NULL;  <---scq is set to NULL\n    ...\n  }\n\nqp_init:\n  rxe_put{\n    ...\n    rxe_qp_do_cleanup {\n      ...\n      atomic_dec(&qp->scq->num_wq); <--- scq is accessed\n      ...\n      atomic_dec(&qp->rcq->num_wq); <--- rcq is accessed\n    }\n}","affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"4703b4f0d94a5f887297713a2f6c2916a1ef08fd"},{"fixed":"8598b9d0a364c1663c96fc0fab9df0d36c809aea"},{"fixed":"37da51efe6eaa0560f46803c8c436a48a2084da7"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50135.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.19.0"},{"fixed":"5.19.2"}]}],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50135.json"}}],"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/37da51efe6eaa0560f46803c8c436a48a2084da7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/8598b9d0a364c1663c96fc0fab9df0d36c809aea"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50135.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50135"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50135.json"}}