The following issues were found
include/linux/if_team.h
1 issues
Line: 58
Column: 12
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
* become a port.
*/
struct {
unsigned char dev_addr[MAX_ADDR_LEN];
unsigned int mtu;
} orig;
#ifdef CONFIG_NET_POLL_CONTROLLER
struct netpoll *np;
Reported by FlawFinder.
drivers/xen/pcpu.c
1 issues
Line: 101
Column: 9
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
{
struct pcpu *cpu = container_of(dev, struct pcpu, dev);
return sprintf(buf, "%u\n", !!(cpu->flags & XEN_PCPU_FLAGS_ONLINE));
}
static ssize_t __ref online_store(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
Reported by FlawFinder.
include/linux/sched.h
1 issues
Line: 982
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
* - access it with [gs]et_task_comm()
* - lock it with task_lock()
*/
char comm[TASK_COMM_LEN];
struct nameidata *nameidata;
#ifdef CONFIG_SYSVIPC
struct sysv_sem sysvsem;
Reported by FlawFinder.
include/linux/sched/signal.h
1 issues
Line: 514
Column: 52
CWE codes:
732
__set_current_blocked(¤t->saved_sigmask);
}
extern int set_user_sigmask(const sigset_t __user *umask, size_t sigsetsize);
static inline void restore_saved_sigmask_unless(bool interrupted)
{
if (interrupted)
WARN_ON(!signal_pending(current));
Reported by FlawFinder.
include/linux/stmmac.h
1 issues
Line: 234
Column: 66
CWE codes:
78
Suggestion:
try using a library call that implements the same functionality if available
void (*exit)(struct platform_device *pdev, void *priv);
struct mac_device_info *(*setup)(void *priv);
int (*clks_config)(void *priv, bool enabled);
int (*crosststamp)(ktime_t *device, struct system_counterval_t *system,
void *ctx);
void *bsp_priv;
struct clk *stmmac_clk;
struct clk *pclk;
struct clk *clk_ptp_ref;
Reported by FlawFinder.
include/linux/iio/frequency/adf4350.h
1 issues
Line: 109
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 adf4350_platform_data {
char name[32];
unsigned long clkin;
unsigned long channel_spacing;
unsigned long long power_up_frequency;
unsigned short ref_div_factor; /* 10-bit R counter */
Reported by FlawFinder.
include/linux/iio/iio-opaque.h
1 issues
Line: 62
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
#if defined(CONFIG_DEBUG_FS)
struct dentry *debugfs_dentry;
unsigned cached_reg_addr;
char read_buf[20];
unsigned int read_buf_len;
#endif
};
#define to_iio_dev_opaque(_indio_dev) \
Reported by FlawFinder.
drivers/video/fbdev/sis/300vtbl.h
1 issues
Line: 619
Column: 23
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
{ 0x2b,0xc2, 35} /* 0x4c */ /* 768@576@60 */
};
static const unsigned char SiS300_SR15[4 * 8] =
{
0x01,0x09,0xa3,0x00,
0x43,0x43,0x43,0x00,
0x1e,0x1e,0x1e,0x00,
0x2a,0x2a,0x2a,0x00,
Reported by FlawFinder.
include/linux/inetdevice.h
1 issues
Line: 150
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
unsigned char ifa_scope;
unsigned char ifa_prefixlen;
__u32 ifa_flags;
char ifa_label[IFNAMSIZ];
/* In seconds, relative to tstamp. Expiry is at tstamp + HZ * lft. */
__u32 ifa_valid_lft;
__u32 ifa_preferred_lft;
unsigned long ifa_cstamp; /* created timestamp */
Reported by FlawFinder.
include/linux/scpi_protocol.h
1 issues
Line: 36
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
u16 sensor_id;
u8 class;
u8 trigger_type;
char name[20];
} __packed;
/**
* struct scpi_ops - represents the various operations provided
* by SCP through SCPI message protocol
Reported by FlawFinder.