The following issues were found

arch/csky/include/asm/pgalloc.h
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 51 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	if (ret) {
		init = pgd_offset(&init_mm, 0UL);
		pgd_init((unsigned long *)ret);
		memcpy(ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
			(PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
		/* prevent out of order excute */
		smp_mb();
#ifdef CONFIG_CPU_NEED_TLBSYNC
		dcache_wb_range((unsigned int)ret,

            

Reported by FlawFinder.

arch/x86/include/asm/mce.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 163 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

               * is set.
 */
struct mce_log_buffer {
	char signature[12]; /* "MACHINECHECK" */
	unsigned len;	    /* = elements in .mce_entry[] */
	unsigned next;
	unsigned flags;
	unsigned recordlen;	/* length of struct mce */
	struct mce entry[];

            

Reported by FlawFinder.

arch/csky/abiv1/strksyms.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 6 Column: 15 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              
#include <linux/module.h>

EXPORT_SYMBOL(memcpy);

            

Reported by FlawFinder.

arch/x86/include/asm/page_32.h
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 44 Column: 2 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              
static inline void copy_page(void *to, void *from)
{
	memcpy(to, from, PAGE_SIZE);
}
#endif	/* CONFIG_X86_3DNOW */
#endif	/* !__ASSEMBLY__ */

#endif /* _ASM_X86_PAGE_32_H */

            

Reported by FlawFinder.

Documentation/usb/usbdevfs-drop-permissions.c
1 issues
open - Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents?
Security

Line: 61 Column: 7 CWE codes: 362

              	uint32_t mask, caps;
	int c, fd;

	fd = open(argv[1], O_RDWR);
	if (fd < 0) {
		printf("Failed to open file\n");
		goto err_fd;
	}


            

Reported by FlawFinder.

block/blk-settings.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 665 Column: 3 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 (blk_stack_limits(&t->limits, &bdev_get_queue(bdev)->limits,
			get_start_sect(bdev) + (offset >> 9)) < 0) {
		char top[BDEVNAME_SIZE], bottom[BDEVNAME_SIZE];

		disk_name(disk, 0, top);
		bdevname(bdev, bottom);

		printk(KERN_NOTICE "%s: Warning: Device %s is misaligned\n",

            

Reported by FlawFinder.

arch/csky/abiv1/inc/abi/string.h
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 7 Column: 14 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              #define __ABI_CSKY_STRING_H

#define __HAVE_ARCH_MEMCPY
extern void *memcpy(void *, const void *, __kernel_size_t);

#endif /* __ABI_CSKY_STRING_H */

            

Reported by FlawFinder.

arch/x86/include/asm/prom.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 34 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

              #define of_ioapic 0
#endif

extern char cmd_line[COMMAND_LINE_SIZE];

#endif /* __ASSEMBLY__ */
#endif

            

Reported by FlawFinder.

arch/alpha/mm/init.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

Line: 49 Column: 3 CWE codes: 120
Suggestion: Make sure destination can always hold the source data

              	init = pgd_offset(&init_mm, 0UL);
	if (ret) {
#ifdef CONFIG_ALPHA_LARGE_VMALLOC
		memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
			(PTRS_PER_PGD - USER_PTRS_PER_PGD - 1)*sizeof(pgd_t));
#else
		pgd_val(ret[PTRS_PER_PGD-2]) = pgd_val(init[PTRS_PER_PGD-2]);
#endif


            

Reported by FlawFinder.

arch/alpha/lib/fls.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 12 Column: 16 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

              /* This is fls(x)-1, except zero is held to zero.  This allows most
   efficient input into extbl, plus it allows easy handling of fls(0)=0.  */

const unsigned char __flsm1_tab[256] = 
{
  0,
  0,
  1, 1,
  2, 2, 2, 2,

            

Reported by FlawFinder.