The following issues were found
drivers/net/ethernet/ethoc.c
1 issues
Line: 823
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
ethoc_do_set_mac_address(dev);
return 0;
}
static void ethoc_set_multicast_list(struct net_device *dev)
Reported by FlawFinder.
drivers/net/ethernet/intel/fm10k/fm10k_pci.c
1 issues
Line: 2071
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
INIT_LIST_HEAD(&interface->macvlan_requests);
netdev_rss_key_fill(rss_key, sizeof(rss_key));
memcpy(interface->rssrk, rss_key, sizeof(rss_key));
/* Initialize the mailbox lock */
spin_lock_init(&interface->mbx_lock);
spin_lock_init(&interface->macvlan_lock);
Reported by FlawFinder.
drivers/net/ethernet/marvell/octeontx2/nic/cn10k.c
1 issues
Line: 159
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
*/
tar_addr |= sq->io_addr | (((size / 16) - 1) & 0x7) << 4;
dma_wmb();
memcpy(sq->lmt_addr, sq->sqe_base, size);
cn10k_lmt_flush(val, tar_addr);
sq->head++;
sq->head &= (sq->sqe_cnt - 1);
}
Reported by FlawFinder.
drivers/net/usb/asix.h
1 issues
Line: 186
Column: 2
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
struct mii_bus *mdio;
struct phy_device *phydev;
u16 phy_addr;
char phy_name[20];
};
extern const struct driver_info ax88172a_info;
/* ASIX specific flags */
Reported by FlawFinder.
drivers/net/fddi/skfp/fplustm.c
1 issues
Line: 449
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
*/
* (char *) a = (char) ((long)DBEACON_INFO<<24L) ;
a[1] = 0 ;
memcpy((char *)a+1, (char *) &smc->mib.m[MAC0].fddiMACUpstreamNbr, ETH_ALEN);
CHECK_NPP() ;
/* set memory address reg for writes */
MARW(smc->hw.fp.fifo.rbc_ram_start+DBEACON_FRAME_OFF+4) ;
write_mdr(smc,le32_to_cpu(a[0])) ;
Reported by FlawFinder.
drivers/net/fddi/skfp/ess.c
1 issues
Line: 204
Column: 4
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
db->sm_len = mb->sm_len ;
db->sm_off = mb->sm_off ;
memcpy(((char *)(db->sm_data+db->sm_off)),(char *)sm,
(int)db->sm_len) ;
dump_smt(smc,
(struct smt_header *)(db->sm_data+db->sm_off),
"RAF") ;
smt_send_frame(smc,db,FC_SMT_INFO,0) ;
Reported by FlawFinder.
drivers/net/fddi/skfp/ecm.c
1 issues
Line: 488
CWE codes:
758
break ;
}
initiator = ENTITY_PHY(p) ;
smc->e.trace_prop &= ~ENTITY_BIT(ENTITY_PHY(p)) ;
}
upstream = cem_get_upstream(smc,initiator) ;
if (upstream == ENTITY_MAC) {
/* signal trace termination */
Reported by Cppcheck.
drivers/net/ethernet/intel/fm10k/fm10k_netdev.c
1 issues
Line: 1391
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!l2_accel)
return ERR_PTR(-ENOMEM);
memcpy(l2_accel, old_l2_accel,
offsetof(struct fm10k_l2_accel,
macvlan[old_l2_accel->size]));
l2_accel->size = (old_l2_accel->size * 2) + 1;
Reported by FlawFinder.
drivers/net/wireless/cisco/airo_cs.c
1 issues
Line: 153
Column: 12
CWE codes:
362
{
struct local_info *local = link->priv;
if (link->open) {
reset_airo_card(local->eth_dev);
netif_device_attach(local->eth_dev);
}
return 0;
Reported by FlawFinder.
drivers/net/usb/cdc_mbim.c
1 issues
Line: 398
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
skb_reset_mac_header(skb);
eth_hdr(skb)->h_proto = proto;
eth_zero_addr(eth_hdr(skb)->h_source);
memcpy(eth_hdr(skb)->h_dest, dev->net->dev_addr, ETH_ALEN);
/* add datagram */
skb_put_data(skb, buf, len);
/* map MBIM session to VLAN */
Reported by FlawFinder.