The following issues were found
arch/arm/crypto/curve25519-glue.c
1 issues
Line: 58
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
curve25519_generate_secret(secret);
else if (len == CURVE25519_KEY_SIZE &&
crypto_memneq(buf, curve25519_null_point, CURVE25519_KEY_SIZE))
memcpy(secret, buf, CURVE25519_KEY_SIZE);
else
return -EINVAL;
return 0;
}
Reported by FlawFinder.
arch/x86/um/asm/processor_32.h
1 issues
Line: 47
Column: 9
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
static inline void arch_copy_thread(struct arch_thread *from,
struct arch_thread *to)
{
memcpy(&to->tls_array, &from->tls_array, sizeof(from->tls_array));
}
#define current_sp() ({ void *sp; __asm__("movl %%esp, %0" : "=r" (sp) : ); sp; })
#define current_bp() ({ unsigned long bp; __asm__("movl %%ebp, %0" : "=r" (bp) : ); bp; })
Reported by FlawFinder.
arch/x86/um/bugs_32.c
1 issues
Line: 46
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
void arch_examine_signal(int sig, struct uml_pt_regs *regs)
{
unsigned char tmp[2];
/*
* This is testing for a cmov (0x0f 0x4x) instruction causing a
* SIGILL in init.
*/
Reported by FlawFinder.
arch/sparc/include/asm/ebus_dma.h
1 issues
Line: 23
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
#define EBUS_DMA_EVENT_DMA 2
#define EBUS_DMA_EVENT_DEVICE 4
unsigned char name[64];
};
int ebus_dma_register(struct ebus_dma_info *p);
int ebus_dma_irq_enable(struct ebus_dma_info *p, int on);
void ebus_dma_unregister(struct ebus_dma_info *p);
Reported by FlawFinder.
arch/sparc/include/asm/floppy_32.h
1 issues
Line: 280
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 platform_device *op;
struct device_node *dp;
struct resource r;
char state[128];
phandle fd_node;
phandle tnode;
int num_regs;
use_virtual_dma = 1;
Reported by FlawFinder.
arch/mips/include/asm/octeon/cvmx-coremask.h
1 issues
Line: 65
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
static inline void cvmx_coremask_copy(struct cvmx_coremask *dest,
const struct cvmx_coremask *src)
{
memcpy(dest, src, sizeof(*dest));
}
/*
* Set the lower 64-bit of the coremask.
*/
Reported by FlawFinder.
arch/arm/crypto/aes-neonbs-glue.c
1 issues
Line: 399
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
/* handle ciphertext stealing */
scatterwalk_map_and_copy(buf, req->dst, req->cryptlen - AES_BLOCK_SIZE,
AES_BLOCK_SIZE, 0);
memcpy(buf + AES_BLOCK_SIZE, buf, tail);
scatterwalk_map_and_copy(buf, req->src, req->cryptlen, tail, 0);
crypto_xor(buf, req->iv, AES_BLOCK_SIZE);
if (encrypt)
Reported by FlawFinder.
arch/mips/include/asm/octeon/cvmx-bootmem.h
1 issues
Line: 84
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
*/
uint64_t size;
/* name of named block */
char name[CVMX_BOOTMEM_NAME_LEN];
};
/* Current descriptor versions */
/* CVMX bootmem descriptor major version */
#define CVMX_BOOTMEM_DESC_MAJ_VER 3
Reported by FlawFinder.
arch/sparc/include/asm/page_32.h
1 issues
Line: 21
Column: 29
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
#ifndef __ASSEMBLY__
#define clear_page(page) memset((void *)(page), 0, PAGE_SIZE)
#define copy_page(to,from) memcpy((void *)(to), (void *)(from), PAGE_SIZE)
#define clear_user_page(addr, vaddr, page) \
do { clear_page(addr); \
sparc_flush_page_to_ram(page); \
} while (0)
#define copy_user_page(to, from, vaddr, page) \
Reported by FlawFinder.
arch/sparc/include/asm/page_64.h
1 issues
Line: 49
Column: 24
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
#define clear_page(X) _clear_page((void *)(X))
struct page;
void clear_user_page(void *addr, unsigned long vaddr, struct page *page);
#define copy_page(X,Y) memcpy((void *)(X), (void *)(Y), PAGE_SIZE)
void copy_user_page(void *to, void *from, unsigned long vaddr, struct page *topage);
#define __HAVE_ARCH_COPY_USER_HIGHPAGE
struct vm_area_struct;
void copy_user_highpage(struct page *to, struct page *from,
unsigned long vaddr, struct vm_area_struct *vma);
Reported by FlawFinder.