The following issues were found
kernel/debug/kdb/kdb_bp.c
1 issues
Line: 71
Column: 24
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
if ((argc + 1) != nextarg) {
unsigned long len;
diag = kdbgetularg((char *)argv[nextarg],
&len);
if (diag)
return diag;
Reported by FlawFinder.
net/netfilter/nfnetlink.c
1 issues
Line: 58
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
static struct lock_class_key nfnl_lockdep_keys[NFNL_SUBSYS_COUNT];
static const char *const nfnl_lockdep_names[NFNL_SUBSYS_COUNT] = {
[NFNL_SUBSYS_NONE] = "nfnl_subsys_none",
[NFNL_SUBSYS_CTNETLINK] = "nfnl_subsys_ctnetlink",
[NFNL_SUBSYS_CTNETLINK_EXP] = "nfnl_subsys_ctnetlink_exp",
[NFNL_SUBSYS_QUEUE] = "nfnl_subsys_queue",
[NFNL_SUBSYS_ULOG] = "nfnl_subsys_ulog",
Reported by FlawFinder.
include/uapi/video/edid.h
1 issues
Line: 6
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
#define _UAPI__linux_video_edid_h__
struct edid_info {
unsigned char dummy[128];
};
#endif /* _UAPI__linux_video_edid_h__ */
Reported by FlawFinder.
include/uapi/sound/sof/fw.h
1 issues
Line: 74
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
* Firmware file header.
*/
struct snd_sof_fw_header {
unsigned char sig[SND_SOF_FW_SIG_SIZE]; /* "Reef" */
__u32 file_size; /* size of file minus this header */
__u32 num_modules; /* number of modules */
__u32 abi; /* version of header format */
} __packed;
Reported by FlawFinder.
kernel/dma/contiguous.c
1 issues
Line: 140
Column: 3
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
for_each_online_node(nid) {
int ret;
char name[CMA_MAX_NAME];
struct cma **cma = &dma_contiguous_pernuma_area[nid];
snprintf(name, sizeof(name), "pernuma%d", nid);
ret = cma_declare_contiguous_nid(0, pernuma_size_bytes, 0, 0,
0, false, name, cma, nid);
Reported by FlawFinder.
include/uapi/sound/sfnt_info.h
1 issues
Line: 81
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 SNDRV_SFNT_PAT_SHARED 0x200 /* sample is shared */
short reserved;
char name[SNDRV_SFNT_PATCH_NAME_LEN];
};
/*
* raw voice information record
Reported by FlawFinder.
kernel/events/internal.h
1 issues
Line: 174
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
static inline unsigned long
memcpy_common(void *dst, const void *src, unsigned long n)
{
memcpy(dst, src, n);
return 0;
}
DEFINE_OUTPUT_COPY(__output_copy, memcpy_common)
Reported by FlawFinder.
include/uapi/sound/hdspm.h
1 issues
Line: 187
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 hdspm_version {
__u8 card_type; /* enum hdspm_io_type */
char cardname[20];
unsigned int serial;
unsigned short firmware_rev;
int addons;
};
Reported by FlawFinder.
kernel/exit.c
1 issues
Line: 1513
} else {
struct task_struct *tsk = current;
do {
retval = do_wait_thread(wo, tsk);
if (retval)
goto end;
retval = ptrace_do_wait(wo, tsk);
Reported by Cppcheck.
include/uapi/sound/hdsp.h
1 issues
Line: 55
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
unsigned char wordclock_sync_check;
unsigned char spdif_sync_check;
unsigned char adatsync_sync_check;
unsigned char adat_sync_check[3];
unsigned char spdif_in;
unsigned char spdif_out;
unsigned char spdif_professional;
unsigned char spdif_emphasis;
unsigned char spdif_nonaudio;
Reported by FlawFinder.