Skip to content

Commit

Permalink
fix: lpfc_send_rscn_event sends bigger buffer size
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: James Smart <[email protected]>
Reviewed-by: Hannes Reinecke <[email protected]>
Reviewed-by: Sebastian Herbszt <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
  • Loading branch information
alesax authored and James Bottomley committed Oct 27, 2015
1 parent db6f1c2 commit 6599eaa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/lpfc/lpfc_els.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 6599eaa

Please sign in to comment.