Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2dc02ee5 authored by Kiran Patil's avatar Kiran Patil Committed by James Bottomley
Browse files

[SCSI] libfcoe: VN2VN connection setup causing stack memory corruption.



Fix: When FIP frame is received, function fcoe_ctlr_vn_recv calls function
fcoe_ctlr_vn_parse which does memset for addr (&buf.rdata) which leads to
memory corruption. Code was trying to treat "buf" as struct but it was defined
as union. Fix is to change from union to struct for "buf" in function fcoe_ctlr_vn_recv.

Technical Details: N/A

Signed-off-by: default avatarKiran Patil <kiran.patil@intel.com>
Acked-by: default avatarJoe Eykholt <jeykholt@cisco.com>
Signed-off-by: default avatarRobert Love <robert.w.love@intel.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent c531b9b4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2296,7 +2296,7 @@ static int fcoe_ctlr_vn_recv(struct fcoe_ctlr *fip, struct sk_buff *skb)
{
	struct fip_header *fiph;
	enum fip_vn2vn_subcode sub;
	union {
	struct {
		struct fc_rport_priv rdata;
		struct fcoe_rport frport;
	} buf;