The following issues were found
include/linux/fsl/ptp_qoriq.h
1 issues
Line: 161
Column: 8
CWE codes:
120
20
u32 tmr_fiper1;
u32 tmr_fiper2;
u32 tmr_fiper3;
u32 (*read)(unsigned __iomem *addr);
void (*write)(unsigned __iomem *addr, u32 val);
};
static inline u32 qoriq_read_be(unsigned __iomem *addr)
{
Reported by FlawFinder.
fs/9p/v9fs.c
1 issues
Line: 74
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
{Opt_err, NULL}
};
static const char *const v9fs_cache_modes[nr__p9_cache_modes] = {
[CACHE_NONE] = "none",
[CACHE_MMAP] = "mmap",
[CACHE_LOOSE] = "loose",
[CACHE_FSCACHE] = "fscache",
};
Reported by FlawFinder.
fs/9p/cache.c
1 issues
Line: 63
Column: 7
CWE codes:
126
v9ses->fscache = fscache_acquire_cookie(v9fs_cache_netfs.primary_index,
&v9fs_cache_session_index_def,
v9ses->cachetag,
strlen(v9ses->cachetag),
NULL, 0,
v9ses, 0, true);
p9_debug(P9_DEBUG_FSC, "session %p get cookie %p\n",
v9ses, v9ses->fscache);
}
Reported by FlawFinder.
include/linux/genl_magic_func.h
1 issues
Line: 50
Column: 26
CWE codes:
134
Suggestion:
Use a constant for the format specification
#ifndef __KERNEL__
#ifndef pr_info
#define pr_info(args...) fprintf(stderr, args);
#endif
#endif
#ifdef GENL_MAGIC_DEBUG
static void dprint_field(const char *dir, int nla_type,
Reported by FlawFinder.
include/linux/gnss.h
1 issues
Line: 31
Column: 8
CWE codes:
362
};
struct gnss_operations {
int (*open)(struct gnss_device *gdev);
void (*close)(struct gnss_device *gdev);
int (*write_raw)(struct gnss_device *gdev, const unsigned char *buf,
size_t count);
};
Reported by FlawFinder.
include/linux/greybus/connection.h
1 issues
Line: 57
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
enum gb_connection_state state;
struct list_head operations;
char name[16];
struct workqueue_struct *wq;
atomic_t op_cycle;
void *private;
Reported by FlawFinder.
include/linux/greybus/greybus_protocols.h
1 issues
Line: 2023
Column: 9
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
__u8 id; /* 0-63 */
__u8 iface; /* GB_AUDIO_IFACE_* */
__le16 data_cport;
__le32 access; /* GB_AUDIO_ACCESS_* */
__u8 count; /* count of same elements */
__u8 count_values; /* count of values, max=2 for CTL_DOUBLE_xxx */
struct gb_audio_ctl_elem_info info;
} __packed;
Reported by FlawFinder.
drivers/video/fbdev/sis/310vtbl.h
1 issues
Line: 914
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
{ 0x75,0x13, 84} /* 0x76 1280x854 60Hz (SiS LVDS) LCD */
};
static const unsigned char SiS310_SR15[4 * 8] =
{
0x00,0x04,0x60,0x60,
0x0f,0x0f,0x0f,0x0f,
0xba,0xba,0xba,0xba,
0xa9,0xa9,0xac,0xac,
Reported by FlawFinder.
drivers/zorro/zorro.c
1 issues
Line: 177
Column: 3
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
}
z->slotaddr = zi->slotaddr;
z->slotsize = zi->slotsize;
sprintf(z->name, "Zorro device %08x", z->id);
zorro_name_device(z);
z->resource.start = zi->boardaddr;
z->resource.end = zi->boardaddr + zi->boardsize - 1;
z->resource.name = z->name;
r = zorro_find_parent_resource(pdev, z);
Reported by FlawFinder.
include/linux/scc.h
1 issues
Line: 66
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
char option;
char enhanced; /* Enhanced SCC support */
unsigned char wreg[16]; /* Copy of last written value in WRx */
unsigned char status; /* Copy of R0 at last external interrupt */
unsigned char dcd; /* DCD status */
struct scc_kiss kiss; /* control structure for KISS params */
struct scc_stat stat; /* statistical information */
Reported by FlawFinder.