The following issues were found
arch/sh/include/asm/user.h
1 issues
Line: 52
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 long u_ar0; /* help gdb find registers */
struct user_fpu_struct* u_fpstate; /* Math Co-processor pointer */
unsigned long magic; /* identifies a core file */
char u_comm[32]; /* user command name */
};
#define NBPG PAGE_SIZE
#define UPAGES 1
#define HOST_TEXT_START_ADDR (u.start_code)
Reported by FlawFinder.
arch/arm/include/asm/mach/pci.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 pci_bus *bus; /* PCI bus */
struct list_head resources; /* root bus resources (apertures) */
struct resource io_res;
char io_res_name[12];
/* Bridge swizzling */
u8 (*swizzle)(struct pci_dev *, u8 *);
/* IRQ mapping */
int (*map_irq)(const struct pci_dev *, u8, u8);
void *private_data; /* platform controller private data */
Reported by FlawFinder.
arch/sh/kernel/cpu/sh4/sq.c
1 issues
Line: 295
Column: 8
CWE codes:
120
Suggestion:
Use sprintf_s, snprintf, or vsnprintf
char *p = buf;
for (list = &sq_mapping_list; (entry = *list); list = &entry->next)
p += sprintf(p, "%08lx-%08lx [%08lx]: %s\n",
entry->sq_addr, entry->sq_addr + entry->size,
entry->addr, entry->name);
return p - buf;
}
Reported by FlawFinder.
arch/mips/include/asm/string.h
1 issues
Line: 17
Column: 14
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
extern void *memset(void *__s, int __c, size_t __count);
#define __HAVE_ARCH_MEMCPY
extern void *memcpy(void *__to, __const__ void *__from, size_t __n);
#define __HAVE_ARCH_MEMMOVE
extern void *memmove(void *__dest, __const__ void *__src, size_t __n);
#endif /* _ASM_STRING_H */
Reported by FlawFinder.
arch/sh/kernel/crash_dump.c
1 issues
Line: 42
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -EFAULT;
}
} else
memcpy(buf, (vaddr + offset), csize);
iounmap(vaddr);
return csize;
}
Reported by FlawFinder.
arch/sh/kernel/dwarf.c
1 issues
Line: 762
Column: 7
CWE codes:
126
UNWINDER_BUG_ON(cie->version != 1);
cie->augmentation = p;
p += strlen(cie->augmentation) + 1;
count = dwarf_read_uleb128(p, &cie->code_alignment_factor);
p += count;
count = dwarf_read_leb128(p, &cie->data_alignment_factor);
Reported by FlawFinder.
arch/mips/include/asm/sn/sn0/hubmd.h
1 issues
Line: 587
Column: 3
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
initiator:11, /* 60-50: id of request initiator*/
backoff: 2, /* 49-48: backoff control */
msg_type: 8, /* 47-40: type of request */
access: 2, /* 39-38: access rights of initiator*/
priority: 1, /* 37: priority level of requestor*/
dir_state: 4, /* 36-33: state of directory */
pointer_me:1, /* 32: initiator same as dir ptr */
address: 29, /* 31-03: request address */
rsvd2: 2, /* 02-01: reserved */
Reported by FlawFinder.
arch/arm/include/asm/kexec.h
1 issues
Line: 40
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
struct pt_regs *oldregs)
{
if (oldregs) {
memcpy(newregs, oldregs, sizeof(*newregs));
} else {
__asm__ __volatile__ (
"stmia %[regs_base], {r0-r12}\n\t"
"mov %[_ARM_sp], sp\n\t"
"str lr, %[_ARM_lr]\n\t"
Reported by FlawFinder.
arch/alpha/include/uapi/asm/a.out.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 scnhdr
{
char s_name[8];
__u64 s_paddr;
__u64 s_vaddr;
__u64 s_size;
__u64 s_scnptr;
__u64 s_relptr;
Reported by FlawFinder.
arch/sh/kernel/kprobes.c
1 issues
Line: 54
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
void __kprobes arch_copy_kprobe(struct kprobe *p)
{
memcpy(p->ainsn.insn, p->addr, MAX_INSN_SIZE * sizeof(kprobe_opcode_t));
p->opcode = *p->addr;
}
void __kprobes arch_arm_kprobe(struct kprobe *p)
{
Reported by FlawFinder.