The following issues were found
samples/seccomp/bpf-direct.c
1 issues
Line: 166
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
#define payload(_c) (_c), sizeof((_c))
int main(int argc, char **argv)
{
char buf[4096];
ssize_t bytes = 0;
if (install_emulator())
return 1;
if (install_filter())
return 1;
Reported by FlawFinder.
sound/soc/intel/catpt/messages.h
1 issues
Line: 381
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
u32 inbox_size;
u32 outbox_size;
u32 fw_info_size;
char fw_info[FW_INFO_SIZE_MAX];
} __packed;
struct catpt_notify_position {
u32 stream_position;
u32 fw_cycle_count;
Reported by FlawFinder.
sound/soc/intel/catpt/pcm.c
1 issues
Line: 682
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return CATPT_IPC_ERROR(ret);
/* store device format set for given SSP */
memcpy(&cdev->devfmt[devfmt.iface], &devfmt, sizeof(devfmt));
return 0;
}
static struct snd_soc_dai_driver dai_drivers[] = {
/* FE DAIs */
Reported by FlawFinder.
scripts/kconfig/lxdialog/dialog.h
1 issues
Line: 154
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
/* item list manipulation for lxdialog use */
#define MAXITEMSTR 200
struct dialog_item {
char str[MAXITEMSTR]; /* prompt displayed */
char tag;
void *data; /* pointer to menu item - used by menubox+checklist */
int selected; /* Set to 1 by dialog_*() function if selected. */
};
Reported by FlawFinder.
sound/soc/intel/catpt/trace.h
1 issues
Line: 67
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
),
TP_fast_assign(
memcpy(__get_dynamic_array(buf), data, size);
),
TP_printk("%u byte(s)%s",
__get_dynamic_array_len(buf),
__print_hex_dump("", DUMP_PREFIX_NONE, 16, 4,
Reported by FlawFinder.
sound/soc/intel/common/sst-dsp-priv.h
1 issues
Line: 24
Column: 8
CWE codes:
120
20
struct sst_ops {
/* Shim IO */
void (*write)(void __iomem *addr, u32 offset, u32 value);
u32 (*read)(void __iomem *addr, u32 offset);
/* IRQ handlers */
irqreturn_t (*irq_handler)(int irq, void *context);
/* SST init and free */
Reported by FlawFinder.
scripts/sorttable.c
1 issues
Line: 77
Column: 7
CWE codes:
362
struct stat sb;
void *addr = NULL;
fd = open(fname, O_RDWR);
if (fd < 0) {
perror(fname);
return NULL;
}
if (fstat(fd, &sb) < 0) {
Reported by FlawFinder.
sound/soc/intel/common/sst-ipc.c
1 issues
Line: 68
Column: 5
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (reply) {
reply->header = msg->rx.header;
if (reply->data)
memcpy(reply->data, msg->rx.data, msg->rx.size);
}
ret = msg->errno;
}
list_add_tail(&msg->list, &ipc->empty_list);
Reported by FlawFinder.
samples/seccomp/dropper.c
1 issues
Line: 69
Column: 2
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
if (install_filter(strtol(argv[1], NULL, 0), strtol(argv[2], NULL, 0),
strtol(argv[3], NULL, 0)))
return 1;
execv(argv[4], &argv[4]);
printf("Failed to execv\n");
return 255;
}
Reported by FlawFinder.
sound/soc/intel/skylake/cnl-sst.c
1 issues
Line: 58
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
}
ctx->dsp_ops.stream_tag = stream_tag;
memcpy(ctx->dmab.area, fwdata, fwsize);
ret = skl_dsp_core_power_up(ctx, SKL_DSP_CORE0_MASK);
if (ret < 0) {
dev_err(ctx->dev, "dsp core0 power up failed\n");
ret = -EIO;
Reported by FlawFinder.