The following issues were found

lib/842/842_debugfs.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              	sw842_debugfs_root = debugfs_create_dir(MODULE_NAME, NULL);

	for (i = 0; i < ARRAY_SIZE(template_count); i++) {
		char name[32];

		snprintf(name, 32, "template_%02x", i);
		debugfs_create_atomic_t(name, m, sw842_debugfs_root,
					&template_count[i]);
	}

            

Reported by FlawFinder.

net/netfilter/nft_fib.c
1 issues
strncpy - Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned]
Security

Line: 149 Column: 4 CWE codes: 120

              		if (priv->flags & NFTA_FIB_F_PRESENT)
			*dreg = !!dev;
		else
			strncpy(reg, dev ? dev->name : "", IFNAMSIZ);
		break;
	default:
		WARN_ON_ONCE(1);
		*dreg = 0;
		break;

            

Reported by FlawFinder.

include/linux/ucb1400.h
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 114 Column: 25 CWE codes: 120 20

              
static inline u16 ucb1400_reg_read(struct snd_ac97 *ac97, u16 reg)
{
	return ac97->bus->ops->read(ac97, reg);
}

static inline void ucb1400_reg_write(struct snd_ac97 *ac97, u16 reg, u16 val)
{
	ac97->bus->ops->write(ac97, reg, val);

            

Reported by FlawFinder.

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

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

               */
static union {
	raw_spinlock_t lock;
	char pad[L1_CACHE_BYTES];
} atomic64_lock[NR_LOCKS] __cacheline_aligned_in_smp = {
	[0 ... (NR_LOCKS - 1)] = {
		.lock =  __RAW_SPIN_LOCK_UNLOCKED(atomic64_lock.lock),
	},
};

            

Reported by FlawFinder.

include/uapi/linux/netfilter/xt_RATEEST.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              #include <linux/if.h>

struct xt_rateest_target_info {
	char			name[IFNAMSIZ];
	__s8			interval;
	__u8		ewma_log;

	/* Used internally by the kernel */
	struct xt_rateest	*est __attribute__((aligned(8)));

            

Reported by FlawFinder.

lib/bug.c
1 issues
Comparing pointers that point to different objects
Error

Line: 150 CWE codes: 570

              {
	struct bug_entry *bug;

	for (bug = __start___bug_table; bug < __stop___bug_table; ++bug)
		if (bugaddr == bug_addr(bug))
			return bug;

	return module_find_bug(bugaddr);
}

            

Reported by Cppcheck.

include/uapi/linux/netfilter/xt_NFLOG.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              	__u16	threshold;
	__u16	flags;
	__u16	pad;
	char		prefix[64];
};

#endif /* _XT_NFLOG_TARGET */

            

Reported by FlawFinder.

lib/crc-t10dif.c
1 issues
sprintf - Does not check for buffer overflows
Security

Line: 116 Column: 10 CWE codes: 120
Suggestion: Use sprintf_s, snprintf, or vsnprintf

              	int len;

	if (static_branch_unlikely(&crct10dif_fallback))
		return sprintf(buffer, "fallback\n");

	rcu_read_lock();
	tfm = rcu_dereference(crct10dif_tfm);
	len = snprintf(buffer, PAGE_SIZE, "%s\n",
		       crypto_shash_driver_name(tfm));

            

Reported by FlawFinder.

net/netfilter/nft_immediate.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	if (priv->dreg == NFT_REG_VERDICT)
		return nft_immediate_offload_verdict(ctx, flow, priv);

	memcpy(&ctx->regs[priv->dreg].data, &priv->data, sizeof(priv->data));

	return 0;
}

static const struct nft_expr_ops nft_imm_ops = {

            

Reported by FlawFinder.

include/uapi/linux/netfilter/xt_LOG.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 17 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 xt_log_info {
	unsigned char level;
	unsigned char logflags;
	char prefix[30];
};

#endif /* _XT_LOG_H */

            

Reported by FlawFinder.