]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
RDMA/uverbs: Protect from attempts to create flows on unsupported QP
authorLeon Romanovsky <leonro@mellanox.com>
Sun, 24 Jun 2018 08:23:42 +0000 (11:23 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 1 Mar 2019 13:20:55 +0000 (14:20 +0100)
commit63d971f8e7b040c4b41fc3c31ef07ad1e3bedcee
tree73cd1e30ddac58de61aa095003640a94260d3a15
parent2334a1974154f7dc12aec462e3d6c429a9dd3546
RDMA/uverbs: Protect from attempts to create flows on unsupported QP

BugLink: http://bugs.launchpad.net/bugs/1815234
commit 940efcc8889f0d15567eb07fc9fd69b06e366aa5 upstream.

Flows can be created on UD and RAW_PACKET QP types. Attempts to provide
other QP types as an input causes to various unpredictable failures.

The reason is that in order to support all various types (e.g. XRC), we
are supposed to use real_qp handle and not qp handle and expect to
driver/FW to fail such (XRC) flows. The simpler and safer variant is to
ban all QP types except UD and RAW_PACKET, instead of relying on
driver/FW.

Cc: <stable@vger.kernel.org> # 3.11
Fixes: 436f2ad05a0b ("IB/core: Export ib_create/destroy_flow through uverbs")
Cc: syzkaller <syzkaller@googlegroups.com>
Reported-by: Noa Osherovich <noaos@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/infiniband/core/uverbs_cmd.c