The following issues were found
security/selinux/ss/conditional.c
1 issues
Line: 458
Column: 8
CWE codes:
126
u32 len;
int rc;
len = strlen(key);
buf[0] = cpu_to_le32(booldatum->value);
buf[1] = cpu_to_le32(booldatum->state);
buf[2] = cpu_to_le32(len);
rc = put_entry(buf, sizeof(u32), 3, fp);
if (rc)
Reported by FlawFinder.
sound/pci/ice1712/pontis.c
1 issues
Line: 621
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 void wm_proc_regs_write(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
struct snd_ice1712 *ice = entry->private_data;
char line[64];
unsigned int reg, val;
mutex_lock(&ice->gpio_mutex);
while (!snd_info_get_line(buffer, line, sizeof(line))) {
if (sscanf(line, "%x %x", ®, &val) != 2)
continue;
Reported by FlawFinder.
sound/hda/intel-sdw-acpi.c
1 issues
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 bool is_link_enabled(struct fwnode_handle *fw_node, int i)
{
struct fwnode_handle *link;
char name[32];
u32 quirk_mask = 0;
/* Find master handle */
snprintf(name, sizeof(name),
"mipi-sdw-link-%d-subproperties", i);
Reported by FlawFinder.
security/selinux/include/policycap_names.h
1 issues
Line: 8
Column: 7
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 "policycap.h"
/* Policy capability names */
const char *selinux_policycap_names[__POLICYDB_CAPABILITY_MAX] = {
"network_peer_controls",
"open_perms",
"extended_socket_class",
"always_check_network",
"cgroup_seclabel",
Reported by FlawFinder.
samples/bpf/tcp_bufs_kern.c
1 issues
Line: 25
#define DEBUG 1
SEC("sockops")
int bpf_bufs(struct bpf_sock_ops *skops)
{
int bufsize = 1500000;
int rwnd_init = 40;
int rv = 0;
Reported by Cppcheck.
sound/pci/ice1712/se.c
1 issues
Line: 600
Column: 9
CWE codes:
362/367!
Suggestion:
Set up the correct permissions (e.g., using setuid()) and try to open the file directly
cont.info = se200pci_cont_volume_info;
cont.get = se200pci_cont_volume_get;
cont.put = se200pci_cont_volume_put;
cont.access |= SNDRV_CTL_ELEM_ACCESS_TLV_READ;
if (se200pci_cont[i].type == VOLUME1)
cont.tlv.p = db_scale_gain1;
else
cont.tlv.p = db_scale_gain2;
break;
Reported by FlawFinder.
sound/hda/hda_bus_type.c
1 issues
Line: 70
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 int hda_uevent(struct device *dev, struct kobj_uevent_env *env)
{
char modalias[32];
snd_hdac_codec_modalias(dev_to_hdac_dev(dev), modalias,
sizeof(modalias));
if (add_uevent_var(env, "MODALIAS=%s", modalias))
return -ENOMEM;
Reported by FlawFinder.
sound/pci/ice1712/wm8766.h
1 issues
Line: 122
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 snd_kcontrol *kctl;
const char *name;
snd_ctl_elem_type_t type;
const char *const enum_names[WM8766_ENUM_MAX];
const unsigned int *tlv;
u16 reg1, reg2, mask1, mask2, min, max, flags;
void (*set)(struct snd_wm8766 *wm, u16 ch1, u16 ch2);
void (*get)(struct snd_wm8766 *wm, u16 *ch1, u16 *ch2);
};
Reported by FlawFinder.
sound/hda/ext/hdac_ext_bus.c
1 issues
Line: 80
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
int snd_hdac_ext_bus_device_init(struct hdac_bus *bus, int addr,
struct hdac_device *hdev, int type)
{
char name[15];
int ret;
hdev->bus = bus;
snprintf(name, sizeof(name), "ehdaudio%dD%d", bus->idx, addr);
Reported by FlawFinder.
sound/pci/ice1712/wm8776.h
1 issues
Line: 178
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 snd_wm8776_ctl {
const char *name;
snd_ctl_elem_type_t type;
const char *const enum_names[WM8776_ENUM_MAX];
const unsigned int *tlv;
u16 reg1, reg2, mask1, mask2, min, max, flags;
void (*set)(struct snd_wm8776 *wm, u16 ch1, u16 ch2);
void (*get)(struct snd_wm8776 *wm, u16 *ch1, u16 *ch2);
};
Reported by FlawFinder.