The following issues were found
drivers/net/ipvlan/ipvtap.c
1 issues
Line: 145
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 device *classdev;
dev_t devt;
int err;
char tap_name[IFNAMSIZ];
if (dev->rtnl_link_ops != &ipvtap_link_ops)
return NOTIFY_DONE;
snprintf(tap_name, IFNAMSIZ, "tap%d", dev->ifindex);
Reported by FlawFinder.
drivers/net/ipvlan/ipvlan_core.c
1 issues
Line: 406
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
else
arp_ptr += port->dev->addr_len;
memcpy(&dip, arp_ptr, 4);
addr = ipvlan_ht_addr_lookup(port, &dip, false);
break;
}
}
Reported by FlawFinder.
drivers/net/ipa/ipa_endpoint.c
1 issues
Line: 1139
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
skb = __dev_alloc_skb(len, GFP_ATOMIC);
if (skb) {
skb_put(skb, len);
memcpy(skb->data, data, len);
skb->truesize += extra;
}
/* Now receive it, or drop it if there's no netdev */
if (endpoint->netdev)
Reported by FlawFinder.
drivers/net/ipa/ipa_data-v4.9.c
1 issues
Line: 169
/* Source resource configuration data for an SoC having IPA v4.9 */
static const struct ipa_resource ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 1, .max = 12,
},
.limits[IPA_RSRC_GROUP_SRC_DMA] = {
.min = 1, .max = 1,
},
Reported by Cppcheck.
drivers/net/ipa/ipa_data-v4.5.c
1 issues
Line: 177
/* Source resource configuration data for an SoC having IPA v4.5 */
static const struct ipa_resource ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 1, .max = 11,
},
.limits[IPA_RSRC_GROUP_SRC_UC_RX_Q] = {
.min = 1, .max = 63,
},
Reported by Cppcheck.
drivers/net/ipa/ipa_data-v4.2.c
1 issues
Line: 170
/* Source resource configuration data for an SoC having IPA v4.2 */
static const struct ipa_resource ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 3, .max = 63,
},
},
[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Reported by Cppcheck.
drivers/net/ipa/ipa_data-v4.11.c
1 issues
Line: 168
/* Source resource configuration data for an SoC having IPA v4.11 */
static const struct ipa_resource ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 6, .max = 6,
},
},
[IPA_RESOURCE_TYPE_SRC_DESCRIPTOR_LISTS] = {
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
Reported by Cppcheck.
drivers/net/ipa/ipa_data-v3.5.1.c
1 issues
Line: 177
/* Source resource configuration data for an SoC having IPA v3.5.1 */
static const struct ipa_resource ipa_resource_src[] = {
[IPA_RESOURCE_TYPE_SRC_PKT_CONTEXTS] = {
.limits[IPA_RSRC_GROUP_SRC_LWA_DL] = {
.min = 1, .max = 255,
},
.limits[IPA_RSRC_GROUP_SRC_UL_DL] = {
.min = 1, .max = 255,
},
Reported by Cppcheck.
drivers/net/ethernet/mellanox/mlx5/core/lib/fs_chains.c
1 issues
Line: 211
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
create_chain_restore(struct fs_chain *chain)
{
struct mlx5_eswitch *esw = chain->chains->dev->priv.eswitch;
char modact[MLX5_UN_SZ_BYTES(set_add_copy_action_in_auto)];
struct mlx5_fs_chains *chains = chain->chains;
enum mlx5e_tc_attr_to_reg chain_to_reg;
struct mlx5_modify_hdr *mod_hdr;
u32 index;
int err;
Reported by FlawFinder.
drivers/net/netdevsim/netdevsim.h
1 issues
Line: 43
Column: 7
CWE codes:
327
Suggestion:
Use a different algorithm, such as SHA-256, with a larger, non-repeating salt
u32 key[4];
u32 salt;
bool used;
bool crypt;
bool rx;
};
struct nsim_ipsec {
struct nsim_sa sa[NSIM_IPSEC_MAX_SA_COUNT];
Reported by FlawFinder.