The following issues were found
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
1 issues
Line: 209
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -EADDRNOTAVAIL;
if (!otx2_hw_set_mac_addr(pfvf, addr->sa_data)) {
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
/* update dmac field in vlan offload rule */
if (pfvf->flags & OTX2_FLAG_RX_VLAN_SUPPORT)
otx2_install_rxvlan_offload_flow(pfvf);
/* update dmac address in ntuple and DMAC filter list */
if (pfvf->flags & OTX2_FLAG_DMACFLTR_SUPPORT)
Reported by FlawFinder.
drivers/net/fddi/skfp/cfm.c
1 issues
Line: 603
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
len = sizeof(path_wrap_s) ;
break ;
}
memcpy(to,path,len) ;
LINT_USE(path_index);
return len;
}
Reported by FlawFinder.
drivers/net/ethernet/marvell/prestera/prestera_switchdev.c
1 issues
Line: 615
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return err;
}
memcpy(&br_port->flags, &flags.val, sizeof(flags.val));
return 0;
}
static int prestera_port_attr_br_ageing_set(struct prestera_port *port,
Reported by FlawFinder.
drivers/net/ethernet/freescale/gianfar.h
1 issues
Line: 1081
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 gfar_irqinfo {
unsigned int irq;
char name[GFAR_INT_NAME_MAX];
};
/**
* struct gfar_priv_grp - per group structure
* @napi: the napi poll function
Reported by FlawFinder.
drivers/net/usb/gl620a.c
1 issues
Line: 59
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 gl_packet {
__le32 packet_length;
char packet_data [1];
};
struct gl_header {
__le32 packet_count;
struct gl_packet packets;
Reported by FlawFinder.
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth-debugfs.c
1 issues
Line: 126
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 fsl_mc_device *dpni_dev;
struct dentry *dir;
char name[10];
/* Create a directory for the interface */
dpni_dev = to_fsl_mc_device(priv->net_dev->dev.parent);
snprintf(name, 10, "dpni.%d", dpni_dev->obj_desc.id);
dir = debugfs_create_dir(name, dpaa2_dbg_root);
Reported by FlawFinder.
drivers/net/ethernet/intel/iavf/iavf_common.c
1 issues
Line: 293
Column: 4
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
len = buf_len;
/* write the full 16-byte chunks */
if (hw->debug_mask & mask) {
char prefix[27];
snprintf(prefix, sizeof(prefix),
"iavf %02x:%02x.%x: \t0x",
hw->bus.bus_id,
hw->bus.device,
Reported by FlawFinder.
drivers/net/ethernet/xscale/ixp4xx_eth.c
1 issues
Line: 1518
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
port->plat = plat;
npe_port_tab[NPE_ID(port->id)] = port;
memcpy(ndev->dev_addr, plat->hwaddr, ETH_ALEN);
platform_set_drvdata(pdev, ndev);
__raw_writel(DEFAULT_CORE_CNTRL | CORE_RESET,
&port->regs->core_control);
Reported by FlawFinder.
drivers/net/ethernet/xilinx/xilinx_emaclite.c
1 issues
Line: 514
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (netif_running(dev))
return -EBUSY;
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
xemaclite_update_address(lp, dev->dev_addr);
return 0;
}
/**
Reported by FlawFinder.
drivers/net/ethernet/intel/fm10k/fm10k_debugfs.c
1 issues
Line: 153
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
void fm10k_dbg_q_vector_init(struct fm10k_q_vector *q_vector)
{
struct fm10k_intfc *interface = q_vector->interface;
char name[16];
int i;
if (!interface->dbg_intfc)
return;
Reported by FlawFinder.