lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM2PR0701MB1392FAF086CEA7AA8F204A5688A60@DM2PR0701MB1392.namprd07.prod.outlook.com>
Date:   Wed, 19 Jul 2017 15:09:03 +0000
From:   "Kalderon, Michal" <Michal.Kalderon@...ium.com>
To:     "Ismail, Mustafa" <mustafa.ismail@...el.com>,
        "Marciniszyn, Mike" <mike.marciniszyn@...el.com>,
        "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
        "dledford@...hat.com" <dledford@...hat.com>
CC:     "swise@...ngridcomputing.com" <swise@...ngridcomputing.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>,
        "Saleem, Shiraz" <shiraz.saleem@...el.com>,
        "Amrani, Ram" <Ram.Amrani@...ium.com>
Subject: Re: [PATCH v2 2/2] RDMA/core: Initialize port_num in qp_attr

From: Ismail, Mustafa <mustafa.ismail@...el.com>
Sent: Wednesday, July 19, 2017 5:38 PM

> > > > Fixes: 5ecce4c9b17b("Check port number supplied by user verbs cmds")
> > > > Cc: <stable@...r.kernel.org> # v2.6.14+
> > > > Reviewed-by: Steve Wise <swise@...ngridcomputing.com>
> > > > Signed-off-by: Mustafa Ismail <mustafa.ismail@...el.com>
> > >
> > Why is the second patch required if you only validate the port_num if the
> > IB_QP_PORT mask is on?
> > Given the first patch [PATCH v2 1/2] RDMA/uverbs: Fix the check for port
> > number, this one seems redundant.
> Strictly speaking it is not required, but we felt it safer to always return a valid port number
> as is done in the IB case.

It's not always initialized in the IB case either. More than that if at this point you'll
initialize it for ib as well you'll get a failure on ib_modify_qp_is_ok, since when
transitioning to RTR  / RTS providing IB_QP_PORT is not a valid option.
We actually hit this issue when running rping over RoCE. (prior to your fix i mean ) 
I agree that in general there's no real harm, but it seems a bit out of context, and if we
make the change common for ib/iwarp we'll have to modify ib_modify_qp_is_ok which 
is written close to the spec. 

thanks,
Michal

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ