]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/uverbs: Restrict usage of privileged QKEYs
authorEdward Srouji <edwards@nvidia.com>
Mon, 5 Jun 2023 10:33:24 +0000 (13:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Jun 2023 13:44:10 +0000 (15:44 +0200)
commit74bd537373726245c21d44a76b909fcfe2789e32
tree53e80418a04799e59c20d688f5f02c65d28c79b3
parenta8997ffad3592ad529c4ca6f8c596224e843e065
RDMA/uverbs: Restrict usage of privileged QKEYs

commit 0cadb4db79e1d9eea66711c4031e435c2191907e upstream.

According to the IB specification rel-1.6, section 3.5.3:
"QKEYs with the most significant bit set are considered controlled
QKEYs, and a HCA does not allow a consumer to arbitrarily specify a
controlled QKEY."

Thus, block non-privileged users from setting such a QKEY.

Cc: stable@vger.kernel.org
Fixes: bc38a6abdd5a ("[PATCH] IB uverbs: core implementation")
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Link: https://lore.kernel.org/r/c00c809ddafaaf87d6f6cb827978670989a511b3.1685960567.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/infiniband/core/uverbs_cmd.c