The following issues were found
net/wireless/core.h
1 issues
Line: 38
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
* cfg80211_regdomain's alpha2 when an intersection has occurred.
* If the AP is reconfigured this can also be used to tell us if
* the country on the country IE changed. */
char country_ie_alpha2[2];
/*
* the driver requests the regulatory core to set this regulatory
* domain as the wiphy's. Only used for %REGULATORY_WIPHY_SELF_MANAGED
* devices using the regulatory_set_wiphy_regd() API
Reported by FlawFinder.
samples/hw_breakpoint/data_breakpoint.c
1 issues
Line: 26
Column: 8
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 perf_event * __percpu *sample_hbp;
static char ksym_name[KSYM_NAME_LEN] = "jiffies";
module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO);
MODULE_PARM_DESC(ksym, "Kernel symbol to monitor; this module will report any"
" write operations on the kernel symbol");
static void sample_hbp_handler(struct perf_event *bp,
Reported by FlawFinder.
sound/pci/au88x0/au88x0_mixer.c
1 issues
Line: 18
Column: 2
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
{
struct snd_ctl_elem_id id;
memset(&id, 0, sizeof(id));
strcpy(id.name, name);
id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
return snd_ctl_remove_id(card, &id);
}
static int snd_vortex_mixer(vortex_t *vortex)
Reported by FlawFinder.
net/vmw_vsock/vmci_transport.c
1 issues
Line: 641
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
/* sk_receive_skb() will do a sock_put(), so hold here. */
sock_hold(sk);
skb_put(skb, size);
memcpy(skb->data, dg, size);
sk_receive_skb(sk, skb, 0);
return VMCI_SUCCESS;
}
Reported by FlawFinder.
sound/pci/au88x0/au88x0.h
1 issues
Line: 144
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
#ifndef CHIP_AU8810
stream_t dma_wt[NR_WT];
wt_voice_t wt_voice[NR_WT]; /* WT register cache. */
char mixwt[(NR_WT / NR_WTPB) * 6]; /* WT mixin objects */
#endif
/* Global resources */
s8 mixcapt[2];
s8 mixplayb[4];
Reported by FlawFinder.
sound/usb/line6/pcm.c
1 issues
Line: 489
Column: 2
CWE codes:
120
Suggestion:
Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused)
if (err < 0)
return err;
pcm = *pcm_ret;
strcpy(pcm->name, line6->properties->name);
/* set operators */
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK,
&snd_line6_playback_ops);
snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_line6_capture_ops);
Reported by FlawFinder.
sound/pci/ca0106/ca_midi.h
1 issues
Line: 44
Column: 18
CWE codes:
120
20
void (*interrupt_enable)(struct snd_ca_midi *midi, int intr);
void (*interrupt_disable)(struct snd_ca_midi *midi, int intr);
unsigned char (*read)(struct snd_ca_midi *midi, int idx);
void (*write)(struct snd_ca_midi *midi, int data, int idx);
/* get info from dev_id */
struct snd_card *(*get_dev_id_card)(void *dev_id);
int (*get_dev_id_port)(void *dev_id);
Reported by FlawFinder.
net/vmw_vsock/virtio_transport_common.c
1 issues
Line: 1053
Column: 4
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
*/
if ((pkt->len <= last_pkt->buf_len - last_pkt->len) &&
!(le32_to_cpu(last_pkt->hdr.flags) & VIRTIO_VSOCK_SEQ_EOR)) {
memcpy(last_pkt->buf + last_pkt->len, pkt->buf,
pkt->len);
last_pkt->len += pkt->len;
free_pkt = true;
last_pkt->hdr.flags |= pkt->hdr.flags;
goto out;
Reported by FlawFinder.
net/vmw_vsock/hyperv_transport.c
1 issues
Line: 86
Column: 12
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 {
unsigned int svm_port;
unsigned char b[sizeof(guid_t) - sizeof(unsigned int)];
};
};
/* Per-socket state (accessed via vsk->trans) */
struct hvsock {
Reported by FlawFinder.
net/rxrpc/recvmsg.c
1 issues
Line: 596
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
struct sockaddr_rxrpc *srx = msg->msg_name;
size_t len = sizeof(call->peer->srx);
memcpy(msg->msg_name, &call->peer->srx, len);
srx->srx_service = call->service_id;
msg->msg_namelen = len;
}
switch (READ_ONCE(call->state)) {
Reported by FlawFinder.