Skip to content
Commit 7b662d28 authored by Roland Dreier's avatar Roland Dreier Committed by Sasha Levin
Browse files

RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device

[ Upstream commit 8435168d

 ]

Check to make sure that ctx->cm_id->device is set before we use it.
Otherwise userspace can trigger a NULL dereference by doing
RDMA_USER_CM_CMD_SET_OPTION on an ID that is not bound to a device.

Cc: <stable@vger.kernel.org>
Reported-by: default avatar <syzbot+a67bc93e14682d92fc2f@syzkaller.appspotmail.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
parent 63df8d82
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment