The following issues were found
arch/arm/mach-orion5x/wrt350n-v2-setup.c
1 issues
Line: 186
};
static struct dsa_chip_data wrt350n_v2_switch_chip_data = {
.port_names[0] = "lan2",
.port_names[1] = "lan1",
.port_names[2] = "wan",
.port_names[3] = "cpu",
.port_names[5] = "lan3",
.port_names[7] = "lan4",
Reported by Cppcheck.
arch/arm/mach-orion5x/wnr854t-setup.c
1 issues
Line: 101
};
static struct dsa_chip_data wnr854t_switch_chip_data = {
.port_names[0] = "lan3",
.port_names[1] = "lan4",
.port_names[2] = "wan",
.port_names[3] = "cpu",
.port_names[5] = "lan1",
.port_names[7] = "lan2",
Reported by Cppcheck.
arch/arm/mach-orion5x/tsx09-common.c
1 issues
Line: 102
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
printk(KERN_INFO "tsx09: found ethernet mac address %pM\n", addr);
memcpy(qnap_tsx09_eth_data.mac_addr, addr, 6);
return 0;
}
/*
Reported by FlawFinder.
arch/x86/kvm/mmu/spte.h
1 issues
Line: 347
Column: 65
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
bool can_unsync, bool host_writable, bool ad_disabled,
u64 *new_spte);
u64 make_nonleaf_spte(u64 *child_pt, bool ad_disabled);
u64 make_mmio_spte(struct kvm_vcpu *vcpu, u64 gfn, unsigned int access);
u64 mark_spte_for_access_track(u64 spte);
u64 kvm_mmu_changed_pte_notifier_make_spte(u64 old_spte, kvm_pfn_t new_pfn);
void kvm_mmu_reset_all_pte_masks(void);
Reported by FlawFinder.
arch/arm/mach-orion5x/ts78xx-fpga.h
1 issues
Line: 22
CWE codes:
190
TS7800_REV_9 = FPGAID(TS7800_FPGA_MAGIC, 0x09),
/* Unaffordable & Expensive */
UAE_DUMMY = FPGAID(0xffffff, 0x01),
};
struct fpga_device {
unsigned present:1;
unsigned init:1;
Reported by Cppcheck.
arch/arm/mach-orion5x/rd88f6183ap-ge-setup.c
1 issues
Line: 35
};
static struct dsa_chip_data rd88f6183ap_ge_switch_chip_data = {
.port_names[0] = "lan1",
.port_names[1] = "lan2",
.port_names[2] = "lan3",
.port_names[3] = "lan4",
.port_names[4] = "wan",
.port_names[5] = "cpu",
Reported by Cppcheck.
arch/powerpc/kexec/core_64.c
1 issues
Line: 329
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* it. Also poison per_cpu_offset and NULL lppaca to catch anyone using
* non-static data.
*/
memcpy(&kexec_paca, get_paca(), sizeof(struct paca_struct));
kexec_paca.data_offset = 0xedeaddeadeeeeeeeUL;
#ifdef CONFIG_PPC_PSERIES
kexec_paca.lppaca_ptr = NULL;
#endif
Reported by FlawFinder.
arch/powerpc/kexec/crash.c
1 issues
Line: 276
CWE codes:
908
}
spin_unlock(&crash_handlers_lock);
return rc;
}
EXPORT_SYMBOL(crash_shutdown_register);
int crash_shutdown_unregister(crash_shutdown_t handler)
{
Reported by Cppcheck.
arch/powerpc/kexec/core_32.c
1 issues
Line: 51
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
reboot_code_buffer_phys = virt_to_phys((void *)reboot_code_buffer);
/* copy our kernel relocation code to the control code page */
memcpy((void *)reboot_code_buffer, relocate_new_kernel,
relocate_new_kernel_size);
flush_icache_range(reboot_code_buffer,
reboot_code_buffer + KEXEC_CONTROL_PAGE_SIZE);
printk(KERN_INFO "Bye!\n");
Reported by FlawFinder.
arch/powerpc/kexec/file_load_64.c
1 issues
Line: 563
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 umem_info *um_info)
{
int n_mem_addr_cells, n_mem_size_cells, node;
char path[NODE_PATH_LEN];
int i, len, ranges, ret;
const __be32 *prop;
u64 base, end;
of_node_get(dn);
Reported by FlawFinder.