Failed to create Receive Work Queue indirection table when the number of work handler equal 1

Bug #1827840 reported by Mohammad Heib
262
This bug affects 1 person
Affects Status Importance Assigned to Milestone
rdma-core (Ubuntu)
New
Undecided
Unassigned

Bug Description

Ib_uverbs failed to create Receive Work Queue indirection table due to unclean cmd buffer.
This issue reproduces when the requested table size is 1 wq handler and it's fixed in rdma-core v23

The following rdma-core patch fixes this issue:

commit 34225464c1d165f63ffd462364810cc9f374109d
Author: Mark Bloch <email address hidden>
Date: Wed Feb 20 20:00:45 2019 +0000

    verbs: clear cmd buffer when creating indirection table

    Make sure we clear the cmd buffer, not doing so will make the kernel to
    fail the command.

    Fixes: 75c65bbcadcd ("verbs: Consolidate duplicate code in create_rwq_ind_table")
    Signed-off-by: Mark Bloch <email address hidden>
    Signed-off-by: Yishai Hadas <email address hidden>

diff --git a/libibverbs/cmd.c b/libibverbs/cmd.c
index 34c71e56..5817c598 100644
--- a/libibverbs/cmd.c
+++ b/libibverbs/cmd.c
@@ -1854,6 +1854,7 @@ int ibv_cmd_create_rwq_ind_table(struct ibv_context *context,
        cmd_size = sizeof(*cmd) + num_tbl_entries * sizeof(cmd->wq_handles[0]);
        cmd_size = (cmd_size + 7) / 8 * 8;
        cmd = alloca(cmd_size);
+ memset(cmd, 0, cmd_size);

        for (i = 0; i < num_tbl_entries; i++)
                cmd->wq_handles[i] = init_attr->ind_tbl[i]->handle;

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: libibverbs-dev 22.1-1
ProcVersionSignature: Ubuntu 5.0.0-13.14-generic 5.0.6
Uname: Linux 5.0.0-13-generic x86_64
ApportVersion: 2.20.10-0ubuntu27
Architecture: amd64
Date: Mon May 6 10:44:06 2019
ProcEnviron:
 LANGUAGE=en_US:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US
 SHELL=/bin/bash
SourcePackage: rdma-core
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Mohammad Heib (mohamadh) wrote :
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

I believe this to be a duplicate of https://bugs.launchpad.net/ubuntu/+source/dpdk/+bug/1823836, which was just fixed in eoan and is in progress for disco 19.04.

Mohammad Heib (mohamadh)
information type: Public → Public Security
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.