The following issues were found

drivers/dma/sf-pdma/sf-pdma.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              {
	struct sf_pdma_chan *chan = to_sf_pdma_chan(dchan);

	memcpy(&chan->cfg, cfg, sizeof(*cfg));

	return 0;
}

static int sf_pdma_alloc_chan_resources(struct dma_chan *dchan)

            

Reported by FlawFinder.

drivers/dma/sh/shdma.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              	const struct sh_dmae_slave_config *config; /* Slave DMA configuration */
	int xmit_shift;			/* log_2(bytes_per_xfer) */
	void __iomem *base;
	char dev_id[16];		/* unique name per DMAC of channel */
	int pm_error;
	dma_addr_t slave_addr;
};

struct sh_dmae_device {

            

Reported by FlawFinder.

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

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

              	struct sprd_dma_chn *schan = to_sprd_dma_chan(chan);
	struct dma_slave_config *slave_cfg = &schan->slave_cfg;

	memcpy(slave_cfg, config, sizeof(*config));
	return 0;
}

static int sprd_dma_pause(struct dma_chan *chan)
{

            

Reported by FlawFinder.

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

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

              {
	struct d40_chan *d40c = container_of(chan, struct d40_chan, chan);

	memcpy(&d40c->slave_config, config, sizeof(*config));

	return 0;
}

/* Runtime reconfiguration extension */

            

Reported by FlawFinder.

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

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

              {
	struct stm32_dma_chan *chan = to_stm32_dma_chan(c);

	memcpy(&chan->dma_sconfig, config, sizeof(*config));

	chan->config_init = true;

	return 0;
}

            

Reported by FlawFinder.

drivers/dma/stm32-mdma.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              {
	struct stm32_mdma_chan *chan = to_stm32_mdma_chan(c);

	memcpy(&chan->dma_config, config, sizeof(*config));

	return 0;
}

static size_t stm32_mdma_desc_residue(struct stm32_mdma_chan *chan,

            

Reported by FlawFinder.

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

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

              {
	struct sun4i_dma_vchan *vchan = to_sun4i_dma_vchan(chan);

	memcpy(&vchan->cfg, config, sizeof(*config));

	return 0;
}

static struct dma_chan *sun4i_dma_of_xlate(struct of_phandle_args *dma_spec,

            

Reported by FlawFinder.

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

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

              {
	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);

	memcpy(&vchan->cfg, config, sizeof(*config));

	return 0;
}

static int sun6i_dma_pause(struct dma_chan *chan)

            

Reported by FlawFinder.

drivers/dma/tegra210-adma.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              {
	struct tegra_adma_chan *tdc = to_tegra_adma_chan(dc);

	memcpy(&tdc->sconfig, sconfig, sizeof(*sconfig));

	return 0;
}

static int tegra_adma_init(struct tegra_adma *tdma)

            

Reported by FlawFinder.

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

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

              		}

		if (i == nslots - 1) {
			memcpy(&edesc->pset[i], &edesc->pset[0],
			       sizeof(edesc->pset[0]));
			break;
		}

		ret = edma_config_pset(chan, &edesc->pset[i], src_addr,

            

Reported by FlawFinder.