The following issues were found

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

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

              	len = sizeof(dst->index);

	attrs.phys.port_number = dp->index;
	memcpy(attrs.switch_id.id, id, len);
	attrs.switch_id.id_len = len;
	memset(dlp, 0, sizeof(*dlp));

	switch (dp->type) {
	case DSA_PORT_TYPE_UNUSED:

            

Reported by FlawFinder.

net/dsa/dsa_priv.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              	/* Specific for SWITCHDEV_FDB_ADD_TO_DEVICE and
	 * SWITCHDEV_FDB_DEL_TO_DEVICE
	 */
	unsigned char addr[ETH_ALEN];
	u16 vid;
	bool host_addr;
};

/* DSA_NOTIFIER_HSR_* */

            

Reported by FlawFinder.

include/sound/ad1843.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 15 Column: 8 CWE codes: 120 20

              
struct snd_ad1843 {
	void *chip;
	int (*read)(void *chip, int reg);
	int (*write)(void *chip, int reg, int val);
};

#define AD1843_GAIN_RECLEV 0
#define AD1843_GAIN_LINE   1

            

Reported by FlawFinder.

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

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

              			skb->csum = c;
		}

		memcpy(dsa_header, new_header, DSA_HLEN);

		if (extra)
			memmove(skb->data - ETH_HLEN,
				skb->data - ETH_HLEN - extra,
				2 * ETH_ALEN);

            

Reported by FlawFinder.

include/linux/timecounter.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 31 Column: 8 CWE codes: 120 20

               * @shift:		cycle to nanosecond divisor (power of two)
 */
struct cyclecounter {
	u64 (*read)(const struct cyclecounter *cc);
	u64 mask;
	u32 mult;
	u32 shift;
};


            

Reported by FlawFinder.

net/ethtool/bitset.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 8 Column: 15 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

              
#define ETHNL_MAX_BITSET_SIZE S16_MAX

typedef const char (*const ethnl_string_array_t)[ETH_GSTRING_LEN];

int ethnl_bitset_is_compact(const struct nlattr *bitset, bool *compact);
int ethnl_bitset_size(const unsigned long *val, const unsigned long *mask,
		      unsigned int nbits, ethnl_string_array_t names,
		      bool compact);

            

Reported by FlawFinder.

include/sound/ac97/controller.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 59 Column: 8 CWE codes: 120 20

              	void (*warm_reset)(struct ac97_controller *adrv);
	int (*write)(struct ac97_controller *adrv, int slot,
		     unsigned short reg, unsigned short val);
	int (*read)(struct ac97_controller *adrv, int slot, unsigned short reg);
};

#if IS_ENABLED(CONFIG_AC97_BUS_NEW)
struct ac97_controller *snd_ac97_controller_register(
	const struct ac97_controller_ops *ops, struct device *dev,

            

Reported by FlawFinder.

include/soc/mscc/ocelot.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 548 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 ocelot_stat_layout {
	u32 offset;
	char name[ETH_GSTRING_LEN];
};

enum ocelot_tag_prefix {
	OCELOT_TAG_PREFIX_DISABLED	= 0,
	OCELOT_TAG_PREFIX_NONE,

            

Reported by FlawFinder.

include/soc/mediatek/smi.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 19 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 mtk_smi_larb_iommu {
	struct device *dev;
	unsigned int   mmu;
	unsigned char  bank[32];
};

/*
 * mtk_smi_larb_get: Enable the power domain and clocks for this local arbiter.
 *                   It also initialize some basic setting(like iommu).

            

Reported by FlawFinder.

include/soc/fsl/qe/qe.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              } __attribute__ ((packed));

struct qe_firmware_info {
	char id[64];		/* Firmware name */
	u32 vtraps[8];		/* Virtual trap addresses */
	u64 extended_modes;	/* Extended modes */
};

#ifdef CONFIG_QUICC_ENGINE

            

Reported by FlawFinder.