{"id":"CVE-2022-50135","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-\u003ercq = NULL;  \u003c---rcq is set to NULL\n    qp-\u003escq = NULL;  \u003c---scq is set to NULL\n    ...\n  }\n\nqp_init:\n  rxe_put{\n    ...\n    rxe_qp_do_cleanup {\n      ...\n      atomic_dec(&qp-\u003escq-\u003enum_wq); \u003c--- scq is accessed\n      ...\n      atomic_dec(&qp-\u003ercq-\u003enum_wq); \u003c--- rcq is accessed\n    }\n}","modified":"2026-04-03T13:14:43.425108Z","published":"2025-06-18T11:02:59.440Z","related":["SUSE-SU-2025:02264-1","SUSE-SU-2025:02321-1"],"database_specific":{"cna_assigner":"Linux","osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/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"}],"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"}}],"schema_version":"1.7.5"}