The following issues were found
drivers/net/ethernet/freescale/enetc/enetc.c
1 issues
Line: 970
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
txbd->buf_len = cpu_to_le16(tx_swbd->len);
txbd->frm_len = cpu_to_le16(frm_len);
memcpy(&tx_ring->tx_swbd[i], tx_swbd, sizeof(*tx_swbd));
}
/* Puts in the TX ring one XDP frame, mapped as an array of TX software buffer
* descriptors.
*/
Reported by FlawFinder.
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c
1 issues
Line: 302
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
skip_static_post = !memcmp(rec_seq, &rn_be, rec_seq_sz);
if (!skip_static_post)
memcpy(rec_seq, &rn_be, rec_seq_sz);
mlx5e_ktls_tx_post_param_wqes(sq, priv_tx, skip_static_post, true);
}
static int
Reported by FlawFinder.
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_rxtx.c
1 issues
Line: 68
Column: 12
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 mlx5e_ipsec_metadata {
unsigned char syndrome;
union {
unsigned char raw[5];
/* from FPGA to host, on successful decrypt */
struct mlx5e_ipsec_rx_metadata rx;
/* from host to FPGA */
struct mlx5e_ipsec_tx_metadata tx;
} __packed content;
Reported by FlawFinder.
drivers/net/wireless/ath/ath6kl/usb.c
1 issues
Line: 918
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return ret;
}
memcpy((u8 *) data, buf, size);
kfree(buf);
return 0;
}
Reported by FlawFinder.
drivers/net/ethernet/qlogic/qed/qed_fcoe.c
1 issues
Line: 841
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
/* Fill task information */
tasks->size = tid_info->tid_size;
tasks->num_tids_per_block = tid_info->num_tids_per_block;
memcpy(tasks->blocks, tid_info->blocks,
MAX_TID_BLOCKS_FCOE * sizeof(u8 *));
kfree(tid_info);
}
Reported by FlawFinder.
drivers/net/wireless/ath/ath9k/ahb.c
1 issues
Line: 82
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
int irq;
int ret = 0;
struct ath_hw *ah;
char hw_name[64];
if (!dev_get_platdata(&pdev->dev)) {
dev_err(&pdev->dev, "no platform data specified\n");
return -EINVAL;
}
Reported by FlawFinder.
drivers/net/wireless/ath/ath9k/ar5008_phy.c
1 issues
Line: 1312
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
ah->tx_power[i] = rate_array[mcs_idx] + ht40_delta;
mcs_idx++;
}
memcpy(&ah->tx_power[ds_offset], &ah->tx_power[ss_offset],
AR5008_HT_SS_RATES);
}
void ar5008_hw_init_rate_txpower(struct ath_hw *ah, int16_t *rate_array,
struct ath9k_channel *chan, int ht40_delta)
Reported by FlawFinder.
drivers/net/wireless/ath/ath9k/ar9002_hw.c
1 issues
Line: 90
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (!data)
return -ENOMEM;
memcpy(data, addac->ia_array, size);
addac->ia_array = data;
if (!AR_SREV_5416_22_OR_LATER(ah)) {
/* override CLKDRV value */
INI_RA(addac, 31,1) = 0;
Reported by FlawFinder.
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_main.h
1 issues
Line: 230
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 hclgevf_misc_vector {
u8 __iomem *addr;
int vector_irq;
char name[HNAE3_INT_NAME_LEN];
};
struct hclgevf_rst_stats {
u32 rst_cnt; /* the number of reset */
u32 vf_func_rst_cnt; /* the number of VF function reset */
Reported by FlawFinder.
drivers/net/ethernet/intel/ice/ice_switch.c
1 issues
Line: 727
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
eth_hdr = s_rule->pdata.lkup_tx_rx.hdr;
/* initialize the ether header with a dummy header */
memcpy(eth_hdr, dummy_eth_header, eth_hdr_sz);
ice_fill_sw_info(hw, f_info);
switch (f_info->fltr_act) {
case ICE_FWD_TO_VSI:
act |= (f_info->fwd_id.hw_vsi_id << ICE_SINGLE_ACT_VSI_ID_S) &
Reported by FlawFinder.