[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025061816-CVE-2022-50135-585a@gregkh>
Date: Wed, 18 Jun 2025 13:03:20 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...nel.org>
Subject: CVE-2022-50135: RDMA/rxe: Fix BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup
From: Greg Kroah-Hartman <gregkh@...nel.org>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
RDMA/rxe: Fix BUG: KASAN: null-ptr-deref in rxe_qp_do_cleanup
The function rxe_create_qp calls rxe_qp_from_init. If some error
occurs, the error handler of function rxe_qp_from_init will set
both scq and rcq to NULL.
Then rxe_create_qp calls rxe_put to handle qp. In the end,
rxe_qp_do_cleanup is called by rxe_put. rxe_qp_do_cleanup directly
accesses scq and rcq before checking them. This will cause
null-ptr-deref error.
The call graph is as below:
rxe_create_qp {
...
rxe_qp_from_init {
...
err1:
...
qp->rcq = NULL; <---rcq is set to NULL
qp->scq = NULL; <---scq is set to NULL
...
}
qp_init:
rxe_put{
...
rxe_qp_do_cleanup {
...
atomic_dec(&qp->scq->num_wq); <--- scq is accessed
...
atomic_dec(&qp->rcq->num_wq); <--- rcq is accessed
}
}
The Linux kernel CVE team has assigned CVE-2022-50135 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.19 with commit 4703b4f0d94a5f887297713a2f6c2916a1ef08fd and fixed in 5.19.2 with commit 8598b9d0a364c1663c96fc0fab9df0d36c809aea
Issue introduced in 5.19 with commit 4703b4f0d94a5f887297713a2f6c2916a1ef08fd and fixed in 6.0 with commit 37da51efe6eaa0560f46803c8c436a48a2084da7
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-50135
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/infiniband/sw/rxe/rxe_qp.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/8598b9d0a364c1663c96fc0fab9df0d36c809aea
https://git.kernel.org/stable/c/37da51efe6eaa0560f46803c8c436a48a2084da7
Powered by blists - more mailing lists