lkml.org 
[lkml]   [2012]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [SCSI] qla4xxx: support iscsiadm session mgmt
From
Date

On Aug 8, 2012, at 11:57 AM, Dan Carpenter <dan.carpenter@oracle.com> wrote:

> On Wed, Aug 08, 2012 at 10:35:44AM -0500, Mike Christie wrote:
>> On 08/08/2012 10:00 AM, Dan Carpenter wrote:
>>> I never heard back on this. This buffer overflow is still present
>>> in the current code.
>>>
>>
>> Qlogic just sent a patch yesterday.
>> http://marc.info/?l=linux-scsi&m=134434199930938&w=2
>
> Ah, good.
>
> It seems like qla4xxx_ep_connect() should take a pointer to struct
> sockaddr_storage and also dst_addr in qla4xxx_get_ep_fwdb() should
> be changed as well. As in:
>
> static struct iscsi_endpoint *
> -qla4xxx_ep_connect(struct Scsi_Host *shost, struct sockaddr *dst_addr,
> +qla4xxx_ep_connect(struct Scsi_Host *shost, struct sockaddr_storage *dst_addr,
> int non_blocking)


Do you mean that should be done to fix a bug or to just make it nicer? I think it will not be a issue bug wise, because it ends up getting cast to the proper struct in the end and the proper size to copy is detected. What actually gets passed that function above is not a struct sockaddr_storage. It is a sockaddr_in or socaddr_in6. It depends on if it is ipv6 or not.

If you are just saying it would be nicer to be consistent in the struct used then it is a larger change that I think should be done in another patch. It will affect other drivers.

\
 
 \ /
  Last update: 2012-08-09 20:22    [W:0.108 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site