Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1687105

Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by user verbs cmds

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by user verbs cmds
Date 2017-07-14 08:50 +0200
Message-ID <u32Aj-84Q-39@gated-at.bofh.it> (permalink)
References <u2Oxj-7s0-3@gated-at.bofh.it> <u2Oxm-7s0-75@gated-at.bofh.it> <u2OH0-7vy-21@gated-at.bofh.it> <u2Pa2-7UJ-5@gated-at.bofh.it> <u2Rlv-Ow-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jul 13, 2017 at 06:44:38PM +0000, Ismail, Mustafa wrote:
> > -----Original Message-----
> > From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
> > Sent: Thursday, July 13, 2017 11:26 AM
> > To: Ismail, Mustafa <mustafa.ismail@intel.com>
> > Cc: linux-kernel@vger.kernel.org; linux-rdma@vger.kernel.org;
> > stable@vger.kernel.org; Yevgeny Kliteynik <kliteyn@mellanox.com>;
> > Tziporet Koren <tziporet@mellanox.com>; Alex Polak
> > <alexpo@mellanox.com>; Boris Pismenny <borisp@mellanox.com>; Leon
> > Romanovsky <leon@kernel.org>; Doug Ledford <dledford@redhat.com>
> > Subject: Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied
> > by user verbs cmds
> > 
> > On Thu, Jul 13, 2017 at 03:54:28PM +0000, Ismail, Mustafa wrote:
> > > > Subject: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied
> > > > by user verbs cmds
> > > >
> > > > 4.4-stable review patch.  If anyone has any objections, please let me
> > know.
> > >
> > > Yes, this breaks modify qp.
> > > See https://patchwork.kernel.org/patch/9830663/
> > 
> > I don't understand this response at all, sorry.
> > 
> > What should I do about this?  Is this patch alone a problem?  Is there some
> > other patch I should apply that is in Linus's tree?  Where is the problem,
> > only in this old release?
> > 
> Applying this patch will break RDMA functionality with respect to modify_qp.
> Specifically this part:
> +	if (cmd.port_num < rdma_start_port(ib_dev) ||
> +	    cmd.port_num > rdma_end_port(ib_dev))
> +		return -EINVAL;
> +
> The cmd.port_num is only valid if (cmd->base.attr_mask & IB_QP_PORT).
> So the above can be fixed with:
> 	if ((cmd->base.attr_mask & IB_QP_PORT) && 
> 	    (cmd.port_num < rdma_start_port(ib_dev) ||
> 	    cmd.port_num > rdma_end_port(ib_dev)))
> 		return -EINVAL;
> 
> A version of this patch is in Linus's tree and it has the same problem:
> commit 5ecce4c9b17bed4dc9cb58bfb10447307569b77b    "RDMA/uverbs: Check port number supplied by user verbs cmds"
> 
> We will be submitting a patch to fix this shortly.

Ok, so we will be "bug compatible" with Linus's tree then, right? :)

Should I hold off on applying this now, or just stay in sync and wait
for your fixes to land in Linus's tree?  I vote stay-in-sync, as the
other stable trees are also "broken" in the same way right now...

thanks,

greg k-h

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by user verbs cmds Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-13 17:50 +0200
  RE: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds "Ismail, Mustafa" <mustafa.ismail@intel.com> - 2017-07-13 18:00 +0200
    Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-13 18:30 +0200
      RE: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds "Ismail, Mustafa" <mustafa.ismail@intel.com> - 2017-07-13 20:50 +0200
        Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-14 08:50 +0200
          RE: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds "Ismail, Mustafa" <mustafa.ismail@intel.com> - 2017-07-14 17:00 +0200
      RE: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds "Marciniszyn, Mike" <mike.marciniszyn@intel.com> - 2017-07-17 19:40 +0200
        Re: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-07-17 21:30 +0200
          RE: [PATCH 4.4 29/57] RDMA/uverbs: Check port number supplied by  user verbs cmds "Marciniszyn, Mike" <mike.marciniszyn@intel.com> - 2017-07-17 21:30 +0200

csiph-web