Commit 6599eaaa authored by Ales Novak's avatar Ales Novak Committed by James Bottomley

fix: lpfc_send_rscn_event sends bigger buffer size

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: default avatarAles Novak <alnovak@suse.cz>
Signed-off-by: default avatarJames Smart <james.smart@avagotech.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarSebastian Herbszt <herbszt@gmx.de>
Signed-off-by: default avatarJames Bottomley <JBottomley@Odin.com>
parent db6f1c2f
...@@ -5401,7 +5401,7 @@ lpfc_send_rscn_event(struct lpfc_vport *vport, ...@@ -5401,7 +5401,7 @@ lpfc_send_rscn_event(struct lpfc_vport *vport,
fc_host_post_vendor_event(shost, fc_host_post_vendor_event(shost,
fc_get_event_number(), fc_get_event_number(),
sizeof(struct lpfc_els_event_header) + payload_len, sizeof(struct lpfc_rscn_event_header) + payload_len,
(char *)rscn_event_data, (char *)rscn_event_data,
LPFC_NL_VENDOR_ID); LPFC_NL_VENDOR_ID);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment