[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: Kiran Patil <kiran.patil@intel.com> Acked-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:
parent
c531b9b49b
commit
2dc02ee52f
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue