The following issues were found

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

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

              {
	struct sockaddr *sa = addr;

	memcpy(dev->dev_addr, sa->sa_data, dev->addr_len);
	return 0;
}

static const struct lapb_register_struct lapbeth_callbacks = {
	.connect_confirmation    = lapbeth_connected,

            

Reported by FlawFinder.

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

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

              	struct cpsw_common *cpsw = ndev_to_cpsw(ndev);

	ppid->id_len = sizeof(cpsw->base_mac);
	memcpy(&ppid->id, &cpsw->base_mac, ppid->id_len);

	return 0;
}

static const struct net_device_ops cpsw_netdev_ops = {

            

Reported by FlawFinder.

drivers/net/wan/lmc/lmc_var.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 341 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

              	char                    lmc_timing; /* for HSSI and SSI */
	int                     got_irq;

	char                    last_led_err[4];

	u32                     last_int;
	u32                     num_int;

	spinlock_t              lmc_lock;

            

Reported by FlawFinder.

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

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

              		if (new_line.loopback != 0 && new_line.loopback != 1)
			return -EINVAL;

		memcpy(&port->settings, &new_line, size); /* Update settings */
		n2_set_iface(port);
		return 0;

	default:
		return hdlc_ioctl(dev, ifr, cmd);

            

Reported by FlawFinder.

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

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

              	if (new_line.loopback != 0 && new_line.loopback != 1)
		return -EINVAL;

	memcpy(&port->settings, &new_line, size); /* Update settings */
	port->iface = new_type;
	pc300_set_iface(port);
	return 0;
}


            

Reported by FlawFinder.

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

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

              		if (new_line.loopback != 0 && new_line.loopback != 1)
			return -EINVAL;

		memcpy(&port->settings, &new_line, size); /* Update settings */
		pci200_set_iface(port);
		sca_flush(port->card);
		return 0;

	default:

            

Reported by FlawFinder.

drivers/net/wireless/intel/iwlwifi/mvm/rfi.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	if (!resp)
		return ERR_PTR(-ENOMEM);

	memcpy(resp, cmd.resp_pkt->data, resp_size);

	iwl_free_resp(&cmd);
	return resp;
}

            

Reported by FlawFinder.

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

Line: 801 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(netdev->dev_addr, saddr->sa_data, netdev->addr_len);

	hw_ops->set_mac_address(pdata, netdev->dev_addr);

	return 0;
}

            

Reported by FlawFinder.

drivers/net/wan/wanxl.h
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 137 Column: 15 CWE codes: 362

              
typedef struct {
// Card to host
	volatile u32 open;
	volatile u32 cable;
	volatile u32 rx_overruns;
	volatile u32 rx_frame_errors;

// Host to card

            

Reported by FlawFinder.

drivers/net/ethernet/mellanox/mlx5/core/esw/bridge_priv.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 16 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

              #include "fs_core.h"

struct mlx5_esw_bridge_fdb_key {
	unsigned char addr[ETH_ALEN];
	u16 vid;
};

enum {
	MLX5_ESW_BRIDGE_FLAG_ADDED_BY_USER = BIT(0),

            

Reported by FlawFinder.