The following issues were found
include/sound/pt2258.h
1 issues
Line: 16
Column: 11
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 snd_i2c_bus *i2c_bus;
struct snd_i2c_device *i2c_dev;
unsigned char volume[6];
int mute;
};
extern int snd_pt2258_reset(struct snd_pt2258 *pt);
extern int snd_pt2258_build_controls(struct snd_pt2258 *pt);
Reported by FlawFinder.
net/core/net_namespace.c
1 issues
Line: 115
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
* the old copy for kfree after a grace period.
*/
memcpy(&ng->ptr[MIN_PERNET_OPS_ID], &old_ng->ptr[MIN_PERNET_OPS_ID],
(old_ng->s.len - MIN_PERNET_OPS_ID) * sizeof(void *));
ng->ptr[id] = data;
rcu_assign_pointer(net->gen, ng);
kfree_rcu(old_ng, s.rcu);
Reported by FlawFinder.
include/sound/mpu401.h
1 issues
Line: 85
Column: 18
CWE codes:
120
20
struct timer_list timer;
void (*write) (struct snd_mpu401 * mpu, unsigned char data, unsigned long addr);
unsigned char (*read) (struct snd_mpu401 *mpu, unsigned long addr);
};
/* I/O ports */
#define MPU401C(mpu) (mpu)->cport
Reported by FlawFinder.
net/core/selftests.c
1 issues
Line: 331
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 const struct net_test {
char name[ETH_GSTRING_LEN];
int (*fn)(struct net_device *ndev);
} net_selftests[] = {
{
.name = "Carrier ",
.fn = net_test_netif_carrier,
Reported by FlawFinder.
include/sound/jack.h
1 issues
Line: 67
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 input_dev *input_dev;
int registered;
int type;
char name[100];
unsigned int key[6]; /* Keep in sync with definitions above */
#endif /* CONFIG_SND_JACK_INPUT_DEV */
int hw_status_cache;
void *private_data;
void (*private_free)(struct snd_jack *);
Reported by FlawFinder.
net/core/sock_diag.c
1 issues
Line: 102
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
goto out;
}
memcpy(nla_data(attr), fprog->filter, flen);
out:
rcu_read_unlock();
return err;
}
EXPORT_SYMBOL(sock_diag_put_filterinfo);
Reported by FlawFinder.
net/nfc/hci/command.c
1 issues
Line: 165
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
return -ENOMEM;
*tmp = idx;
memcpy(tmp + 1, param, param_len);
r = nfc_hci_send_cmd(hdev, gate, NFC_HCI_ANY_SET_PARAMETER,
tmp, param_len + 1, NULL);
kfree(tmp);
Reported by FlawFinder.
net/core/tso.c
1 issues
Line: 22
Column: 2
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
int hdr_len = skb_transport_offset(skb) + tso->tlen;
int mac_hdr_len = skb_network_offset(skb);
memcpy(hdr, skb->data, hdr_len);
if (!tso->ipv6) {
struct iphdr *iph = (void *)(hdr + mac_hdr_len);
iph->id = htons(tso->ip_id);
iph->tot_len = htons(size + hdr_len - mac_hdr_len);
Reported by FlawFinder.
include/sound/hda_codec.h
1 issues
Line: 123
Column: 8
CWE codes:
362
/* PCM callbacks */
struct hda_pcm_ops {
int (*open)(struct hda_pcm_stream *info, struct hda_codec *codec,
struct snd_pcm_substream *substream);
int (*close)(struct hda_pcm_stream *info, struct hda_codec *codec,
struct snd_pcm_substream *substream);
int (*prepare)(struct hda_pcm_stream *info, struct hda_codec *codec,
unsigned int stream_tag, unsigned int format,
Reported by FlawFinder.
include/linux/tpm_eventlog.h
1 issues
Line: 245
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
mapping = marker;
}
memcpy(&halg, mapping, halg_size);
marker = marker + halg_size;
for (j = 0; j < efispecid->num_algs; j++) {
if (halg == efispecid->digest_sizes[j].alg_id) {
marker +=
Reported by FlawFinder.