The following issues were found
drivers/video/fbdev/sis/sis.h
1 issues
Line: 505
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 short chip_id; /* PCI ID of chip */
unsigned short chip_vendor; /* PCI ID of vendor */
char myid[40];
struct pci_dev *nbridge;
struct pci_dev *lpcdev;
int mni; /* Mode number index */
Reported by FlawFinder.
include/linux/dm9000.h
1 issues
Line: 28
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 dm9000_plat_data {
unsigned int flags;
unsigned char dev_addr[ETH_ALEN];
/* allow replacement IO routines */
void (*inblk)(void __iomem *reg, void *data, int len);
void (*outblk)(void __iomem *reg, void *data, int len);
Reported by FlawFinder.
include/linux/dma-buf-map.h
1 issues
Line: 247
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
if (dst->is_iomem)
memcpy_toio(dst->vaddr_iomem, src, len);
else
memcpy(dst->vaddr, src, len);
}
/**
* dma_buf_map_incr - Increments the address stored in a dma-buf mapping
* @map: The dma-buf mapping structure
Reported by FlawFinder.
include/linux/dma/ipu-dma.h
1 issues
Line: 168
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
bool sec_chan_en;
int active_buffer;
unsigned int eof_irq;
char eof_name[16]; /* EOF IRQ name for request_irq() */
};
#define to_tx_desc(tx) container_of(tx, struct idmac_tx_desc, txd)
#define to_idmac_chan(c) container_of(c, struct idmac_channel, dma_chan)
Reported by FlawFinder.
include/linux/dsa/loop.h
1 issues
Line: 15
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 dsa_loop_mib_entry {
char name[ETH_GSTRING_LEN];
unsigned long val;
};
enum dsa_loop_mib_counters {
DSA_LOOP_PHY_READ_OK,
Reported by FlawFinder.
include/linux/dtlk.h
1 issues
Line: 68
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
struct dtlk_settings
{
unsigned short serial_number; /* 0-7Fh:0-7Fh */
unsigned char rom_version[24]; /* null terminated string */
unsigned char mode; /* 0=Character; 1=Phoneme; 2=Text */
unsigned char punc_level; /* nB; 0-7 */
unsigned char formant_freq; /* nF; 0-9 */
unsigned char pitch; /* nP; 0-99 */
unsigned char speed; /* nS; 0-9 */
Reported by FlawFinder.
include/linux/earlycpio.h
1 issues
Line: 12
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 cpio_data {
void *data;
size_t size;
char name[MAX_CPIO_FILE_NAME];
};
struct cpio_data find_cpio_data(const char *path, void *data, size_t len,
long *offset);
Reported by FlawFinder.
include/linux/ecryptfs.h
1 issues
Line: 88
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 key_size;
u32 data_len;
u8 signature[ECRYPTFS_PASSWORD_SIG_SIZE + 1];
char pki_type[ECRYPTFS_MAX_PKI_NAME_BYTES + 1];
u8 data[];
};
/* May be a password or a private key */
struct ecryptfs_auth_tok {
Reported by FlawFinder.
fs/afs/afs_vl.h
1 issues
Line: 77
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
* maps to "struct vldbentry" in vvl-spec.pdf
*/
struct afs_vldbentry {
char name[65]; /* name of volume (with NUL char) */
afs_voltype_t type; /* volume type */
unsigned num_servers; /* num servers that hold instances of this vol */
unsigned clone_id; /* cloning ID */
unsigned flags;
Reported by FlawFinder.
fs/afs/addr_list.c
1 issues
Line: 347
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
srx->transport_len = sizeof(srx->transport.sin6);
srx->transport.sin6.sin6_family = AF_INET6;
srx->transport.sin6.sin6_port = htons(port);
memcpy(&srx->transport.sin6.sin6_addr, xdr, 16);
alist->nr_addrs++;
}
/*
* Get an address to try.
Reported by FlawFinder.