The following issues were found

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

Line: 122 Column: 8 CWE codes: 120 20

              	 */
	void (*write)(struct snd_sof_dev *sof_dev, void __iomem *addr,
		      u32 value); /* optional */
	u32 (*read)(struct snd_sof_dev *sof_dev,
		    void __iomem *addr); /* optional */
	void (*write64)(struct snd_sof_dev *sof_dev, void __iomem *addr,
			u64 value); /* optional */
	u64 (*read64)(struct snd_sof_dev *sof_dev,
		      void __iomem *addr); /* optional */

            

Reported by FlawFinder.

sound/soc/codecs/rt5682-sdw.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	struct rt5682_priv *rt5682 = dev_get_drvdata(&slave->dev);
	int ret;

	memcpy(&rt5682->params, params, sizeof(*params));

	ret = rt5682_clock_config(&slave->dev);
	if (ret < 0)
		dev_err(&slave->dev, "Invalid clk config");


            

Reported by FlawFinder.

sound/soc/codecs/rt5682.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 34 Column: 7 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 "rl6231.h"
#include "rt5682.h"

const char *rt5682_supply_names[RT5682_NUM_SUPPLIES] = {
	"AVDD",
	"MICVDD",
	"VBAT",
};
EXPORT_SYMBOL_GPL(rt5682_supply_names);

            

Reported by FlawFinder.

sound/soc/codecs/rt5682.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              	int irq_work_delay_time;
};

extern const char *rt5682_supply_names[RT5682_NUM_SUPPLIES];

int rt5682_sel_asrc_clk_src(struct snd_soc_component *component,
		unsigned int filter_mask, unsigned int clk_src);

void rt5682_apply_patch_list(struct rt5682_priv *rt5682, struct device *dev);

            

Reported by FlawFinder.

sound/soc/codecs/rt700-sdw.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	struct rt700_priv *rt700 = dev_get_drvdata(&slave->dev);
	int ret;

	memcpy(&rt700->params, params, sizeof(*params));

	ret = rt700_clock_config(&slave->dev);
	if (ret < 0)
		dev_err(&slave->dev, "Invalid clk config");


            

Reported by FlawFinder.

samples/watchdog/watchdog-simple.c
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: 9 Column: 11 CWE codes: 362

              
int main(void)
{
	int fd = open("/dev/watchdog", O_WRONLY);
	int ret = 0;
	if (fd == -1) {
		perror("watchdog");
		exit(EXIT_FAILURE);
	}

            

Reported by FlawFinder.

sound/soc/codecs/rt711-sdw.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	struct rt711_priv *rt711 = dev_get_drvdata(&slave->dev);
	int ret;

	memcpy(&rt711->params, params, sizeof(*params));

	ret = rt711_clock_config(&slave->dev);
	if (ret < 0)
		dev_err(&slave->dev, "Invalid clk config");


            

Reported by FlawFinder.

sound/soc/codecs/rt715-sdw.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	struct rt715_priv *rt715 = dev_get_drvdata(&slave->dev);
	int ret;

	memcpy(&rt715->params, params, sizeof(*params));

	ret = rt715_clock_config(&slave->dev);
	if (ret < 0)
		dev_err(&slave->dev, "Invalid clk config");


            

Reported by FlawFinder.

sound/soc/codecs/sgtl5000.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              };

/* vddd is optional supply */
static const char *supply_names[SGTL5000_SUPPLY_NUM] = {
	"VDDA",
	"VDDIO",
	"VDDD"
};


            

Reported by FlawFinder.

sound/soc/codecs/sigmadsp-i2c.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              		return -ENOMEM;

	put_unaligned_be16(addr, buf);
	memcpy(buf + 2, data, len);

	ret = i2c_master_send(control_data, buf, len + 2);

	kfree(buf);


            

Reported by FlawFinder.