* [PATCH 09/14] fix: lpfc_send_rscn_event sends bigger buffer size
@ 2015-08-31 20:48 James Smart
2015-09-01 21:41 ` Sebastian Herbszt
0 siblings, 1 reply; 2+ messages in thread
From: James Smart @ 2015-08-31 20:48 UTC (permalink / raw)
To: linux-scsi
From: Ales Novak <alnovak@suse.cz>
lpfc_send_rscn_event() allocates data for sizeof(struct
lpfc_rscn_event_header) + payload_len, but claims that the data has size
of sizeof(struct lpfc_els_event_header) + payload_len. That leads to
buffer overruns.
Signed-off-by: Ales Novak <alnovak@suse.cz>
Signed-off-by: James Smart <james.smart@avagotech.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
---
drivers/scsi/lpfc/lpfc_els.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
index c859aa3..f9c957d 100644
--- a/drivers/scsi/lpfc/lpfc_els.c
+++ b/drivers/scsi/lpfc/lpfc_els.c
@@ -5401,7 +5401,7 @@ lpfc_send_rscn_event(struct lpfc_vport *vport,
fc_host_post_vendor_event(shost,
fc_get_event_number(),
- sizeof(struct lpfc_els_event_header) + payload_len,
+ sizeof(struct lpfc_rscn_event_header) + payload_len,
(char *)rscn_event_data,
LPFC_NL_VENDOR_ID);
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 09/14] fix: lpfc_send_rscn_event sends bigger buffer size
2015-08-31 20:48 [PATCH 09/14] fix: lpfc_send_rscn_event sends bigger buffer size James Smart
@ 2015-09-01 21:41 ` Sebastian Herbszt
0 siblings, 0 replies; 2+ messages in thread
From: Sebastian Herbszt @ 2015-09-01 21:41 UTC (permalink / raw)
To: James Smart; +Cc: linux-scsi
James Smart wrote:
>
> From: Ales Novak <alnovak@suse.cz>
>
> lpfc_send_rscn_event() allocates data for sizeof(struct
> lpfc_rscn_event_header) + payload_len, but claims that the data has size
> of sizeof(struct lpfc_els_event_header) + payload_len. That leads to
> buffer overruns.
>
> Signed-off-by: Ales Novak <alnovak@suse.cz>
> Signed-off-by: James Smart <james.smart@avagotech.com>
> Reviewed-by: Hannes Reinecke <hare@suse.de>
> ---
> drivers/scsi/lpfc/lpfc_els.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_els.c b/drivers/scsi/lpfc/lpfc_els.c
> index c859aa3..f9c957d 100644
> --- a/drivers/scsi/lpfc/lpfc_els.c
> +++ b/drivers/scsi/lpfc/lpfc_els.c
> @@ -5401,7 +5401,7 @@ lpfc_send_rscn_event(struct lpfc_vport *vport,
>
> fc_host_post_vendor_event(shost,
> fc_get_event_number(),
> - sizeof(struct lpfc_els_event_header) + payload_len,
> + sizeof(struct lpfc_rscn_event_header) + payload_len,
> (char *)rscn_event_data,
> LPFC_NL_VENDOR_ID);
>
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-01 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31 20:48 [PATCH 09/14] fix: lpfc_send_rscn_event sends bigger buffer size James Smart
2015-09-01 21:41 ` Sebastian Herbszt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).