Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-15 Thread Sagi Grimberg
Hello Hal, With which SRP target has this behavior been observed ? Has this patch been tested with the LIO SRP target ? Hi Bart, This issue was detected when testing a new array with SRP support. This does not involve LIO as the Linux CM stack does not behave in the way described in this pat

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-13 Thread Hal Rosenstock
On 11/12/2015 3:30 PM, Hefty, Sean wrote: >>> + /* CM attributes other than ClassPortInfo only use Send method >> */ >>> + if (mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) { >>> + if (mad_hdr->attr_id != IB_MGMT_CLASSPORTINFO_ATTR_ID) { >>> +

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-13 Thread Hal Rosenstock
On 11/12/2015 5:57 PM, Hefty, Sean wrote: >> IIRC responding to Get(CPI) is mandatory? > > Maybe the drivers are responding? I don't believe that the CM does. Sorry for the confusion. linux kernel CM does not respond to Get(CPI). I was just trying to add the validation code in for that since it

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-13 Thread Hal Rosenstock
IOn 11/12/2015 5:13 PM, Jason Gunthorpe wrote: > On Thu, Nov 12, 2015 at 08:30:55PM +, Hefty, Sean wrote: + /* CM attributes other than ClassPortInfo only use Send method >>> */ + if (mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) { + if (mad_hdr->att

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-13 Thread Hal Rosenstock
On 11/12/2015 1:13 PM, ira.weiny wrote: > On Thu, Nov 12, 2015 at 01:48:50PM +0200, Hal Rosenstock wrote: >> >> Receipt of CM MAD with response method for other than ClassPortInfo >> attribute is invalid. >> >> CM attributes other than ClassPortInfo use send method only >> and GetResp is valid for

RE: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-12 Thread Hefty, Sean
> IIRC responding to Get(CPI) is mandatory? Maybe the drivers are responding? I don't believe that the CM does. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-i

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-12 Thread Jason Gunthorpe
On Thu, Nov 12, 2015 at 08:30:55PM +, Hefty, Sean wrote: > > > + /* CM attributes other than ClassPortInfo only use Send method > > */ > > > + if (mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) { > > > + if (mad_hdr->attr_id != IB_MGMT_CLASSPORTINFO_ATTR_ID) { > > > +

RE: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-12 Thread Hefty, Sean
> > + /* CM attributes other than ClassPortInfo only use Send method > */ > > + if (mad_hdr->mgmt_class == IB_MGMT_CLASS_CM) { > > + if (mad_hdr->attr_id != IB_MGMT_CLASSPORTINFO_ATTR_ID) { > > + if (mad_hdr->method != IB_MGMT_METHOD_S

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-12 Thread ira.weiny
On Thu, Nov 12, 2015 at 01:48:50PM +0200, Hal Rosenstock wrote: > > Receipt of CM MAD with response method for other than ClassPortInfo > attribute is invalid. > > CM attributes other than ClassPortInfo use send method only > and GetResp is valid for ClassPortInfo attribute. > Note also that the

Re: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-12 Thread Bart Van Assche
On 11/12/2015 03:48 AM, Hal Rosenstock wrote: A new SRP target has been observed to respond to Send CM REQ with GetResp of CM REQ with bad status. This is non conformant with IBA spec but exposes a vulnerability in the current MAD/CM code which will respond to the incoming GetResp of CM REQ as if

RE: [PATCH] IB/mad: In validate_mad, validate CM method and attribute

2015-11-12 Thread Hefty, Sean
> Receipt of CM MAD with response method for other than ClassPortInfo > attribute is invalid. > > CM attributes other than ClassPortInfo use send method only > and GetResp is valid for ClassPortInfo attribute. > Note also that the CM ClassPortInfo is not currently supported. > > The SRP initiator