{"id":"CVE-2022-50135","aliases":["CVE-2022-50135"],"related":[],"kind":"vulnerability","state":"published","title":"RDMA/rxe: Fix BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup","summary":"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}","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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}","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: RDMA/rxe: Corrección BUG: KASAN: null-ptr-deref en rxe_qp_do_cleanup La función rxe_create_qp llama a rxe_qp_from_init. Si ocurre algún error, el controlador de errores de la función rxe_qp_from_init establecerá tanto scq como rcq en NULL. Luego, rxe_create_qp llama a rxe_put para manejar qp. Al final, rxe_put llama a rxe_qp_do_cleanup. rxe_qp_do_cleanup accede directamente a scq y rcq antes de verificarlos. Esto causará un error null-ptr-deref. El gráfico de llamadas es el siguiente: rxe_create_qp { ... rxe_qp_from_init { ... err1: ... qp-&gt;rcq = NULL; &lt;---rcq se establece en NULL qp-&gt;scq = NULL; &lt;---scq se establece en NULL ... } qp_init: rxe_put{ ... rxe_qp_do_cleanup { ... atomic_dec(&amp;qp-&gt;scq-&gt;num_wq); &lt;--- se accede a scq ... atomic_dec(&amp;qp-&gt;rcq-&gt;num_wq); &lt;--- se accede a rcq } }","source":"nvd"}],"published":"2025-06-18T11:02:59.440Z","modified":"2026-11-05T20:17:25.040Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":["CWE-476"],"affected":[{"ranges":[{"type":"git","introduced":"4703b4f0d94a5f887297713a2f6c2916a1ef08fd","fixed":"8598b9d0a364c1663c96fc0fab9df0d36c809aea","status":"affected"},{"type":"git","introduced":"4703b4f0d94a5f887297713a2f6c2916a1ef08fd","fixed":"37da51efe6eaa0560f46803c8c436a48a2084da7","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"5.19","status":"affected"},{"type":"semver","introduced":"0","fixed":"5.19","status":"unaffected"},{"type":"semver","introduced":"5.19.2","lastAffected":"5.19.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.0","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"5.19","fixed":"5.19.2"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/8598b9d0a364c1663c96fc0fab9df0d36c809aea","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/37da51efe6eaa0560f46803c8c436a48a2084da7","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-05T19:55:05.892Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-50135","url":"https://www.cve.org/CVERecord?id=CVE-2022-50135","licence":"CVE Terms of Use","modified":"2026-11-05T20:00:18.324Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-50135","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-50135","licence":"Public domain","modified":"2026-11-05T20:17:25.040Z"}],"updatedAt":"2026-11-25T22:58:21.070Z","epss":{"score":0.00219,"percentile":0.13151,"date":"2026-12-01T12:00:22.000Z"}}