The following issues were found

arch/arm64/kernel/smp.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 791 Column: 14 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

              	}
}

static const char *ipi_types[NR_IPI] __tracepoint_string = {
	[IPI_RESCHEDULE]	= "Rescheduling interrupts",
	[IPI_CALL_FUNC]		= "Function call interrupts",
	[IPI_CPU_STOP]		= "CPU stop interrupts",
	[IPI_CPU_CRASH_STOP]	= "CPU stop (for crash dump) interrupts",
	[IPI_TIMER]		= "Timer broadcast interrupts",

            

Reported by FlawFinder.

arch/arm64/kernel/reloc_test_core.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              asmlinkage u64 relative_data16(void);

static struct {
	char	name[32];
	u64	(*f)(void);
	u64	expect;
} const funcs[] = {
	{ "R_AARCH64_ABS64",		absolute_data64, UL(SYM64_ABS_VAL) },
	{ "R_AARCH64_ABS32",		absolute_data32, UL(SYM32_ABS_VAL) },

            

Reported by FlawFinder.

arch/x86/kernel/cpu/centaur.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 208 Column: 3 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              			/* Add L1 data and code cache sizes. */
			c->x86_cache_size = (cc>>24)+(dd>>24);
		}
		sprintf(c->x86_model_id, "WinChip %s", name);
	}
#endif
	if (c->x86 == 6 || c->x86 >= 7)
		init_c3(c);
#ifdef CONFIG_X86_64

            

Reported by FlawFinder.

arch/arm64/kernel/probes/uprobes.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	void *dst = xol_page_kaddr + (vaddr & ~PAGE_MASK);

	/* Initialize the slot */
	memcpy(dst, src, len);

	/* flush caches (dcache/icache) */
	sync_icache_aliases((unsigned long)dst, (unsigned long)dst + len);

	kunmap_atomic(xol_page_kaddr);

            

Reported by FlawFinder.

arch/arm64/kernel/perf_event.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 164 Column: 9 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              
	pmu_attr = container_of(attr, struct perf_pmu_events_attr, attr);

	return sprintf(page, "event=0x%04llx\n", pmu_attr->id);
}

#define ARMV8_EVENT_ATTR(name, config)						\
	PMU_EVENT_ATTR_ID(name, armv8pmu_events_sysfs_show, config)


            

Reported by FlawFinder.

arch/arm64/kernel/pci.c
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 44 Column: 17 CWE codes: 120 20

              
	if (!b)
		return PCIBIOS_DEVICE_NOT_FOUND;
	return b->ops->read(b, devfn, reg, len, val);
}

int raw_pci_write(unsigned int domain, unsigned int bus,
		unsigned int devfn, int reg, int len, u32 val)
{

            

Reported by FlawFinder.

arch/arm64/kernel/machine_kexec.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              {
	void *reloc_code = page_to_virt(kimage->control_code_page);

	memcpy(reloc_code, arm64_relocate_new_kernel,
	       arm64_relocate_new_kernel_size);
	kimage->arch.kern_reloc = __pa(reloc_code);
	kexec_image_info(kimage);

	/*

            

Reported by FlawFinder.

arch/x86/kernel/cpu/intel_epb.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 132 Column: 9 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              	if (ret < 0)
		return ret;

	return sprintf(buf, "%llu\n", epb);
}

static ssize_t energy_perf_bias_store(struct device *dev,
				      struct device_attribute *attr,
				      const char *buf, size_t count)

            

Reported by FlawFinder.

arch/arm64/kernel/image-vars.h
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              /* Position-independent library routines */
KVM_NVHE_ALIAS_HYP(clear_page, __pi_clear_page);
KVM_NVHE_ALIAS_HYP(copy_page, __pi_copy_page);
KVM_NVHE_ALIAS_HYP(memcpy, __pi_memcpy);
KVM_NVHE_ALIAS_HYP(memset, __pi_memset);

#ifdef CONFIG_KASAN
KVM_NVHE_ALIAS_HYP(__memcpy, __pi_memcpy);
KVM_NVHE_ALIAS_HYP(__memset, __pi_memset);

            

Reported by FlawFinder.

arch/arm64/kernel/cpuinfo.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 249 Column: 11 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              		struct cpuinfo_arm64 *info = kobj_to_cpuinfo(kobj);		\
										\
		if (info->reg_midr)						\
			return sprintf(buf, "0x%016llx\n", info->reg_##_field);	\
		else								\
			return 0;						\
	}									\
	static struct kobj_attribute cpuregs_attr_##_name = __ATTR_RO(_name)


            

Reported by FlawFinder.