The following issues were found

drivers/infiniband/hw/usnic/usnic_ib_qp_grp.h
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

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

              
	/* Debug FS */
	struct dentry			*dbgfs_dentry;
	char				dentry_name[32];
};

extern const struct usnic_vnic_res_spec min_transport_spec[USNIC_TRANSPORT_MAX];

const char *usnic_ib_qp_grp_state_to_string(enum ib_qp_state state);

            

Reported by FlawFinder.

drivers/infiniband/hw/usnic/usnic_ib_verbs.c
1 issues
memcpy - Does not check for buffer overflows when copying to destination
Security

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

              	memset(props, 0, sizeof(*props));
	usnic_mac_ip_to_gid(us_ibdev->ufdev->mac, us_ibdev->ufdev->inaddr,
			&gid.raw[0]);
	memcpy(&props->sys_image_guid, &gid.global.interface_id,
		sizeof(gid.global.interface_id));
	usnic_ib_fw_string_to_u64(&info.fw_version[0], &props->fw_ver);
	props->max_mr_size = USNIC_UIOM_MAX_MR_SIZE;
	props->page_size_cap = USNIC_UIOM_PAGE_SIZE;
	props->vendor_id = PCI_VENDOR_ID_CISCO;

            

Reported by FlawFinder.

drivers/gpu/drm/i915/gem/selftests/i915_gem_coherency.c
1 issues
read - Check buffer boundaries if used in a loop including recursive loops
Security

Line: 314 Column: 35 CWE codes: 120 20

              {
	const unsigned int ncachelines = PAGE_SIZE/64;
	struct drm_i915_private *i915 = arg;
	const struct igt_coherency_mode *read, *write, *over;
	unsigned long count, n;
	u32 *offsets, *values;
	I915_RND_STATE(prng);
	struct context ctx;
	int err = 0;

            

Reported by FlawFinder.

drivers/infiniband/hw/usnic/usnic_uiom.h
1 issues
access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 92 Column: 11 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              void usnic_uiom_free_dev_list(struct device **devs);
struct usnic_uiom_reg *usnic_uiom_reg_get(struct usnic_uiom_pd *pd,
						unsigned long addr, size_t size,
						int access, int dmasync);
void usnic_uiom_reg_release(struct usnic_uiom_reg *uiomr);
int usnic_uiom_init(char *drv_name);
#endif /* USNIC_UIOM_H_ */

            

Reported by FlawFinder.

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

Line: 574 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 blinkm_data *data;
	struct blinkm_led *led[3];
	int err, i;
	char blinkm_led_name[28];

	data = devm_kzalloc(&client->dev,
			sizeof(struct blinkm_data), GFP_KERNEL);
	if (!data) {
		err = -ENOMEM;

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/subdev/clk/gm20b.c
1 issues
syntax error: { . domain
Error

Line: 641

              gm20b_pstates[] = {
	{
		.base = {
			.domain[nv_clk_src_gpc] = 76800,
			.voltage = 0,
		},
	},
	{
		.base = {

            

Reported by Cppcheck.

drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk20a.c
1 issues
syntax error: { . domain
Error

Line: 369

              gk20a_pstates[] = {
	{
		.base = {
			.domain[nv_clk_src_gpc] = 72000,
			.voltage = 0,
		},
	},
	{
		.base = {

            

Reported by Cppcheck.

drivers/infiniband/hw/vmw_pvrdma/pvrdma_qp.c
1 issues
access - This usually indicates a security flaw. If an attacker can change anything along the path between the call to access() and the file's actual use (e.g., by moving files), the attacker can exploit the race condition
Security

Line: 667 Column: 42 CWE codes: 362/367!
Suggestion: Set up the correct permissions (e.g., using setuid()) and try to open the file directly

              	wqe_hdr->wr.fast_reg.page_shift = mr->page_shift;
	wqe_hdr->wr.fast_reg.page_list_len = mr->npages;
	wqe_hdr->wr.fast_reg.length = mr->ibmr.length;
	wqe_hdr->wr.fast_reg.access_flags = wr->access;
	wqe_hdr->wr.fast_reg.rkey = wr->key;

	return pvrdma_page_dir_insert_page_list(&mr->pdir, mr->pages,
						mr->npages);
}

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/nvkm/subdev/clk/gk104.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvkm_msec is a macro then please configure it.
Error

Line: 372

              {
	struct nvkm_device *device = clk->base.subdev.device;
	nvkm_mask(device, 0x137100, (1 << idx), 0x00000000);
	nvkm_msec(device, 2000,
		if (!(nvkm_rd32(device, 0x137100) & (1 << idx)))
			break;
	);
}


            

Reported by Cppcheck.

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

Line: 19 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 led_classdev	ldev;
	struct spi_device	*spi;
	int			id;
	char			name[sizeof("dac124s085-3")];

	struct mutex		mutex;
};

struct dac124s085 {

            

Reported by FlawFinder.