The following issues were found
include/uapi/linux/nfs_idmap.h
1 issues
Line: 59
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 idmap_msg {
__u8 im_type;
__u8 im_conv;
char im_name[IDMAP_NAMESZ];
__u32 im_id;
__u8 im_status;
};
Reported by FlawFinder.
include/uapi/linux/nfs3.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
struct nfs3_fh {
unsigned short size;
unsigned char data[NFS3_FHSIZE];
};
#define NFS3_VERSION 3
#define NFS3PROC_NULL 0
#define NFS3PROC_GETATTR 1
Reported by FlawFinder.
include/uapi/linux/nfs2.h
1 issues
Line: 42
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 nfs2_fh {
char data[NFS2_FHSIZE];
};
/*
* Procedure numbers for NFSv2
*/
Reported by FlawFinder.
include/uapi/linux/nfc.h
1 issues
Line: 280
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 nfc_protocol;
__u8 dsap; /* Destination SAP, if known */
__u8 ssap; /* Source SAP to be bound to */
char service_name[NFC_LLCP_MAX_SERVICE_NAME]; /* Service name URI */;
size_t service_name_len;
};
/* NFC socket protocols */
#define NFC_SOCKPROTO_RAW 0
Reported by FlawFinder.
kernel/trace/trace_benchmark.h
1 issues
Line: 26
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
),
TP_fast_assign(
memcpy(__entry->str, str, BENCHMARK_EVENT_STRLEN);
),
TP_printk("%s", __entry->str),
trace_benchmark_reg, trace_benchmark_unreg
Reported by FlawFinder.
include/uapi/linux/netfilter_ipv6/ip6t_LOG.h
1 issues
Line: 17
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 ip6t_log_info {
unsigned char level;
unsigned char logflags;
char prefix[30];
};
#endif /*_IPT_LOG_H*/
Reported by FlawFinder.
kernel/trace/trace_dynevent.c
1 issues
Line: 75
Column: 24
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
for_each_dyn_event_safe(pos, n) {
if (type && type != pos->ops)
continue;
if (!pos->ops->match(system, event,
argc - 1, (const char **)argv + 1, pos))
continue;
ret = pos->ops->free(pos);
if (ret)
Reported by FlawFinder.
kernel/trace/trace_dynevent.h
1 issues
Line: 46
Column: 28
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
int (*show)(struct seq_file *m, struct dyn_event *ev);
bool (*is_busy)(struct dyn_event *ev);
int (*free)(struct dyn_event *ev);
bool (*match)(const char *system, const char *event,
int argc, const char **argv, struct dyn_event *ev);
};
/* Register new dyn_event type -- must be called at first */
int dyn_event_register(struct dyn_event_operations *ops);
Reported by FlawFinder.
kernel/trace/trace_entries.h
1 issues
Line: 59
/*
* Function trace entry - function address and parent function address:
*/
FTRACE_ENTRY_REG(function, ftrace_entry,
TRACE_FN,
F_STRUCT(
__field_fn( unsigned long, ip )
Reported by Cppcheck.
kernel/trace/trace_event_perf.c
1 issues
Line: 15
Column: 8
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 "trace.h"
#include "trace_probe.h"
static char __percpu *perf_trace_buf[PERF_NR_CONTEXTS];
/*
* Force it to be aligned to unsigned long to avoid misaligned accesses
* surprises
*/
Reported by FlawFinder.