[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux1394-devel
Subject:    re: firewire net, ipv4 arp: Extend hardware address and remove driver-level packet inspection.
From:       Dan Carpenter <dan.carpenter () oracle ! com>
Date:       2013-04-02 6:36:41
Message-ID: 20130402063641.GB4826 () longonot ! mountain
[Download RAW message or body]

Hello YOSHIFUJI Hideaki / 吉藤英明,

The patch 6752c8db8e0c: "firewire net, ipv4 arp: Extend hardware 
address and remove driver-level packet inspection." from Mar 25, 
2013, leads to the following warning:
"drivers/firewire/net.c:278 fwnet_header_parse()
	 error: memcpy() 'haddr' too small (8 vs 16)"

drivers/firewire/net.c
   276  static int fwnet_header_parse(const struct sk_buff *skb, unsigned char *haddr)
   277  {
   278          memcpy(haddr, skb->dev->dev_addr, FWNET_ALEN);
                                                  ^^^^^^^^^^
We bumped this to 16 bytes and made the fwnet_header and fwnet_hwaddr
structs bigger.  But according to Smatch this is still an 8 byte buffer
here.  Either phw.hw_addr or sll->sll_addr.

The call tree would be:
-> packet_rcv()
   -> dev_parse_header()
      -> fwnet_header_parse()

   279  
   280          return FWNET_ALEN;
   281  }
   282  

regards,
dan carpenter


------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2
_______________________________________________
mailing list linux1394-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux1394-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic