The following issues were found

drivers/net/ntb_netdev.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 431 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	ndev->watchdog_timeo = msecs_to_jiffies(NTB_TX_TIMEOUT_MS);

	eth_random_addr(ndev->perm_addr);
	memcpy(ndev->dev_addr, ndev->perm_addr, ndev->addr_len);

	ndev->netdev_ops = &ntb_netdev_ops;
	ndev->ethtool_ops = &ntb_ethtool_ops;

	ndev->min_mtu = 0;

            

Reported by FlawFinder.

drivers/net/phy/dp83640.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 1016 Column: 2 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              	mutex_init(&clock->clock_lock);
	INIT_LIST_HEAD(&clock->phylist);
	clock->caps.owner = THIS_MODULE;
	sprintf(clock->caps.name, "dp83640 timer");
	clock->caps.max_adj	= 1953124;
	clock->caps.n_alarm	= 0;
	clock->caps.n_ext_ts	= N_EXT_TS;
	clock->caps.n_per_out	= N_PER_OUT;
	clock->caps.n_pins	= DP83640_N_PINS;

            

Reported by FlawFinder.

drivers/net/phy/marvell.c
1 issues
strlen - Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected)
Security

Line: 2616 Column: 15 CWE codes: 126

              	struct marvell_priv *priv = phydev->priv;
	struct device *dev = &phydev->mdio.dev;
	const char *devname = dev_name(dev);
	size_t len = strlen(devname);
	int i, j;

	priv->hwmon_name = devm_kzalloc(dev, len, GFP_KERNEL);
	if (!priv->hwmon_name)
		return -ENOMEM;

            

Reported by FlawFinder.

drivers/net/phy/mdio-boardinfo.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 72 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              		return -ENOMEM;

	for (i = 0; i < n; i++, be++, info++) {
		memcpy(&be->board_info, info, sizeof(*info));
		mutex_lock(&mdio_board_lock);
		list_add_tail(&be->list, &mdio_board_list);
		mutex_unlock(&mdio_board_lock);
	}


            

Reported by FlawFinder.

drivers/net/ipa/ipa_data-v3.1.c
1 issues
syntax error: { . limits
Error

Line: 185

              /* Source resource configuration data for an SoC having IPA v3.1 */
static const struct ipa_resource ipa_resource_src[] = {
	[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
		.limits[IPA_RSRC_GROUP_SRC_UL] = {
			.min = 3,	.max = 255,
		},
		.limits[IPA_RSRC_GROUP_SRC_DL] = {
			.min = 3,	.max = 255,
		},

            

Reported by Cppcheck.

drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 342 Column: 4 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	if (i40e_is_sw_dcb(pf)) {
		if (state) {
			pf->flags |= I40E_FLAG_DCB_ENABLED;
			memcpy(&pf->hw.desired_dcbx_config,
			       &pf->hw.local_dcbx_config,
			       sizeof(struct i40e_dcbx_config));
		} else {
			pf->flags &= ~I40E_FLAG_DCB_ENABLED;
		}

            

Reported by FlawFinder.

drivers/net/ethernet/mellanox/mlx5/core/lib/crypto.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 41 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              		return -EINVAL;
	}

	memcpy(key_p, key, sz_bytes);

	MLX5_SET(encryption_key_obj, obj, key_size, general_obj_key_size);
	MLX5_SET(encryption_key_obj, obj, key_type, key_type);
	MLX5_SET(general_obj_in_cmd_hdr, in, opcode,
		 MLX5_CMD_OP_CREATE_GENERAL_OBJECT);

            

Reported by FlawFinder.

drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_lcn.c
1 issues
Possible null pointer dereference: iqcomp
Error

Line: 1327 CWE codes: 476

              		return false;
	if (module == 2) {
		while (iqcomp_sz--) {
			if (iqcomp[iqcomp_sz].chan ==
			    CHSPEC_CHANNEL(pi->radio_chanspec)) {
				wlc_lcnphy_set_rx_iq_comp(pi,
							  (u16)
							  iqcomp[iqcomp_sz].a,
							  (u16)

            

Reported by Cppcheck.

drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/phy_n.c
1 issues
failed to expand 'WRITE_RADIO_SYN', Invalid ## usage when expanding 'WRITE_RADIO_SYN'.
Error

Line: 37

              			 radio_type##_##jspace##0 : \
			 radio_type##_##jspace##1), value)

#define WRITE_RADIO_SYN(pi, radio_type, reg_name, value) \
	write_radio_reg(pi, radio_type##_##SYN##_##reg_name, value)

#define READ_RADIO_REG3(pi, radio_type, jspace, core, reg_name)	\
	read_radio_reg(pi, ((core == PHY_CORE_0) ? \
			    radio_type##_##jspace##0##_##reg_name : \

            

Reported by Cppcheck.

drivers/net/phy/nxp-c45-tja11xx.c
1 issues
strncpy - Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned]
Security

Line: 625 Column: 3 CWE codes: 120

              	size_t i;

	for (i = 0; i < ARRAY_SIZE(nxp_c45_hw_stats); i++) {
		strncpy(data + i * ETH_GSTRING_LEN,
			nxp_c45_hw_stats[i].name, ETH_GSTRING_LEN);
	}
}

static void nxp_c45_get_stats(struct phy_device *phydev,

            

Reported by FlawFinder.