The following issues were found
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
1 issues
Line: 2008
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -ERANGE;
}
memcpy(&pfvf->tstamp, &config, sizeof(config));
return copy_to_user(ifr->ifr_data, &config,
sizeof(config)) ? -EFAULT : 0;
}
Reported by FlawFinder.
drivers/net/ethernet/qualcomm/emac/emac-sgmii.h
1 issues
Line: 19
Column: 8
CWE codes:
362
*/
struct sgmii_ops {
int (*init)(struct emac_adapter *adpt);
int (*open)(struct emac_adapter *adpt);
void (*close)(struct emac_adapter *adpt);
int (*link_change)(struct emac_adapter *adpt, bool link_state);
void (*reset)(struct emac_adapter *adpt);
};
Reported by FlawFinder.
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
1 issues
Line: 193
Column: 11
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 list_head route_list;
struct mlx5_pkt_reformat *pkt_reformat;
const struct ip_tunnel_info *tun_info;
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
struct net_device *out_dev;
int route_dev_ifindex;
struct mlx5e_tc_tunnel *tunnel;
int reformat_type;
Reported by FlawFinder.
drivers/net/ethernet/freescale/enetc/enetc_pf.c
1 issues
Line: 43
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!is_valid_ether_addr(saddr->sa_data))
return -EADDRNOTAVAIL;
memcpy(ndev->dev_addr, saddr->sa_data, ndev->addr_len);
enetc_pf_set_primary_mac_addr(&priv->si->hw, 0, saddr->sa_data);
return 0;
}
Reported by FlawFinder.
drivers/net/ethernet/intel/ixgbevf/ixgbevf.h
1 issues
Line: 241
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 napi_struct napi;
struct ixgbevf_ring_container rx, tx;
struct rcu_head rcu; /* to avoid race with update stats on free */
char name[IFNAMSIZ + 9];
/* for dynamic allocation of rings associated with this q_vector */
struct ixgbevf_ring ring[0] ____cacheline_internodealigned_in_smp;
#ifdef CONFIG_NET_RX_BUSY_POLL
unsigned int state;
Reported by FlawFinder.
drivers/net/wireless/ath/ath11k/hal_tx.c
1 issues
Line: 122
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
dscp_tid_map[i + 6]) |
FIELD_PREP(HAL_TCL1_RING_FIELD_DSCP_TID_MAP7,
dscp_tid_map[i + 7]);
memcpy(&hw_map_val[cnt], (u8 *)&value, 3);
cnt += 3;
}
for (i = 0; i < HAL_DSCP_TID_TBL_SIZE; i += 4) {
ath11k_hif_write32(ab, addr, *(u32 *)&hw_map_val[i]);
Reported by FlawFinder.
drivers/net/wireless/ath/ath11k/htc.c
1 issues
Line: 340
Column: 4
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
min_t(int, skb->len,
ATH11K_HTC_MAX_CTRL_MSG_LEN);
memcpy(htc->control_resp_buffer, skb->data,
htc->control_resp_len);
complete(&htc->ctl_resp);
break;
case ATH11K_HTC_MSG_SEND_SUSPEND_COMPLETE:
Reported by FlawFinder.
drivers/net/ethernet/intel/ice/ice_flow.c
1 issues
Line: 1397
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* profile instance
*/
for (i = 0; i < segs_cnt; i++)
memcpy(¶ms->prof->segs[i], &segs[i], sizeof(*segs));
status = ice_flow_proc_segs(hw, params);
if (status) {
ice_debug(hw, ICE_DBG_FLOW, "Error processing a flow's packet segments\n");
goto out;
Reported by FlawFinder.
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
1 issues
Line: 1509
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
struct ieee80211_key_conf *keyconf = info->control.hw_key;
tx_cmd->sec_ctl = TX_CMD_SEC_CCM;
memcpy(tx_cmd->key, keyconf->key, keyconf->keylen);
}
static inline void iwl_mvm_wait_for_async_handlers(struct iwl_mvm *mvm)
{
flush_work(&mvm->async_handlers_wk);
Reported by FlawFinder.
drivers/net/wireless/ath/ath11k/pci.c
1 issues
Line: 79
Column: 14
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
},
};
static const char *irq_name[ATH11K_IRQ_NUM_MAX] = {
"bhi",
"mhi-er0",
"mhi-er1",
"ce0",
"ce1",
Reported by FlawFinder.