Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/iproute2-5.9.0/bridge/br_common.h Examining data/iproute2-5.9.0/bridge/bridge.c Examining data/iproute2-5.9.0/bridge/fdb.c Examining data/iproute2-5.9.0/bridge/link.c Examining data/iproute2-5.9.0/bridge/mdb.c Examining data/iproute2-5.9.0/bridge/monitor.c Examining data/iproute2-5.9.0/bridge/vlan.c Examining data/iproute2-5.9.0/devlink/devlink.c Examining data/iproute2-5.9.0/devlink/mnlg.c Examining data/iproute2-5.9.0/devlink/mnlg.h Examining data/iproute2-5.9.0/examples/bpf/bpf_cyclic.c Examining data/iproute2-5.9.0/examples/bpf/bpf_graft.c Examining data/iproute2-5.9.0/examples/bpf/bpf_map_in_map.c Examining data/iproute2-5.9.0/examples/bpf/bpf_shared.c Examining data/iproute2-5.9.0/examples/bpf/bpf_tailcall.c Examining data/iproute2-5.9.0/genl/ctrl.c Examining data/iproute2-5.9.0/genl/genl.c Examining data/iproute2-5.9.0/genl/genl_utils.h Examining data/iproute2-5.9.0/genl/static-syms.c Examining data/iproute2-5.9.0/include/bpf_api.h Examining data/iproute2-5.9.0/include/bpf_elf.h Examining data/iproute2-5.9.0/include/bpf_scm.h Examining data/iproute2-5.9.0/include/bpf_util.h Examining data/iproute2-5.9.0/include/cg_map.h Examining data/iproute2-5.9.0/include/color.h Examining data/iproute2-5.9.0/include/dlfcn.h Examining data/iproute2-5.9.0/include/ip6tables.h Examining data/iproute2-5.9.0/include/iptables.h Examining data/iproute2-5.9.0/include/iptables/internal.h Examining data/iproute2-5.9.0/include/json_print.h Examining data/iproute2-5.9.0/include/json_writer.h Examining data/iproute2-5.9.0/include/libgenl.h Examining data/iproute2-5.9.0/include/libiptc/ipt_kernel_headers.h Examining data/iproute2-5.9.0/include/libiptc/libip6tc.h Examining data/iproute2-5.9.0/include/libiptc/libiptc.h Examining data/iproute2-5.9.0/include/libiptc/libxtc.h Examining data/iproute2-5.9.0/include/libiptc/xtcshared.h Examining data/iproute2-5.9.0/include/libnetlink.h Examining data/iproute2-5.9.0/include/list.h Examining data/iproute2-5.9.0/include/ll_map.h Examining data/iproute2-5.9.0/include/names.h Examining data/iproute2-5.9.0/include/namespace.h Examining data/iproute2-5.9.0/include/netinet/tcp.h Examining data/iproute2-5.9.0/include/rt_names.h Examining data/iproute2-5.9.0/include/rtm_map.h Examining data/iproute2-5.9.0/include/uapi/asm-generic/sockios.h Examining data/iproute2-5.9.0/include/uapi/linux/atm.h Examining data/iproute2-5.9.0/include/uapi/linux/atmapi.h Examining data/iproute2-5.9.0/include/uapi/linux/atmarp.h Examining data/iproute2-5.9.0/include/uapi/linux/atmdev.h Examining data/iproute2-5.9.0/include/uapi/linux/atmioc.h Examining data/iproute2-5.9.0/include/uapi/linux/atmsap.h Examining data/iproute2-5.9.0/include/uapi/linux/bpf.h Examining data/iproute2-5.9.0/include/uapi/linux/bpf_common.h Examining data/iproute2-5.9.0/include/uapi/linux/btf.h Examining data/iproute2-5.9.0/include/uapi/linux/can.h Examining data/iproute2-5.9.0/include/uapi/linux/can/netlink.h Examining data/iproute2-5.9.0/include/uapi/linux/can/vxcan.h Examining data/iproute2-5.9.0/include/uapi/linux/const.h Examining data/iproute2-5.9.0/include/uapi/linux/devlink.h Examining data/iproute2-5.9.0/include/uapi/linux/elf-em.h Examining data/iproute2-5.9.0/include/uapi/linux/fib_rules.h Examining data/iproute2-5.9.0/include/uapi/linux/filter.h Examining data/iproute2-5.9.0/include/uapi/linux/fou.h Examining data/iproute2-5.9.0/include/uapi/linux/gen_stats.h Examining data/iproute2-5.9.0/include/uapi/linux/genetlink.h Examining data/iproute2-5.9.0/include/uapi/linux/hdlc/ioctl.h Examining data/iproute2-5.9.0/include/uapi/linux/icmpv6.h Examining data/iproute2-5.9.0/include/uapi/linux/if.h Examining data/iproute2-5.9.0/include/uapi/linux/if_addr.h Examining data/iproute2-5.9.0/include/uapi/linux/if_addrlabel.h Examining data/iproute2-5.9.0/include/uapi/linux/if_alg.h Examining data/iproute2-5.9.0/include/uapi/linux/if_arp.h Examining data/iproute2-5.9.0/include/uapi/linux/if_bonding.h Examining data/iproute2-5.9.0/include/uapi/linux/if_bridge.h Examining data/iproute2-5.9.0/include/uapi/linux/if_ether.h Examining data/iproute2-5.9.0/include/uapi/linux/if_infiniband.h Examining data/iproute2-5.9.0/include/uapi/linux/if_link.h Examining data/iproute2-5.9.0/include/uapi/linux/if_macsec.h Examining data/iproute2-5.9.0/include/uapi/linux/if_packet.h Examining data/iproute2-5.9.0/include/uapi/linux/if_tun.h Examining data/iproute2-5.9.0/include/uapi/linux/if_tunnel.h Examining data/iproute2-5.9.0/include/uapi/linux/if_vlan.h Examining data/iproute2-5.9.0/include/uapi/linux/ife.h Examining data/iproute2-5.9.0/include/uapi/linux/ila.h Examining data/iproute2-5.9.0/include/uapi/linux/in.h Examining data/iproute2-5.9.0/include/uapi/linux/in6.h Examining data/iproute2-5.9.0/include/uapi/linux/in_route.h Examining data/iproute2-5.9.0/include/uapi/linux/inet_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/ip.h Examining data/iproute2-5.9.0/include/uapi/linux/ip6_tunnel.h Examining data/iproute2-5.9.0/include/uapi/linux/ipsec.h Examining data/iproute2-5.9.0/include/uapi/linux/kernel.h Examining data/iproute2-5.9.0/include/uapi/linux/l2tp.h Examining data/iproute2-5.9.0/include/uapi/linux/libc-compat.h Examining data/iproute2-5.9.0/include/uapi/linux/limits.h Examining data/iproute2-5.9.0/include/uapi/linux/lwtunnel.h Examining data/iproute2-5.9.0/include/uapi/linux/magic.h Examining data/iproute2-5.9.0/include/uapi/linux/mpls.h Examining data/iproute2-5.9.0/include/uapi/linux/mpls_iptunnel.h Examining data/iproute2-5.9.0/include/uapi/linux/mptcp.h Examining data/iproute2-5.9.0/include/uapi/linux/neighbour.h Examining data/iproute2-5.9.0/include/uapi/linux/net.h Examining data/iproute2-5.9.0/include/uapi/linux/net_namespace.h Examining data/iproute2-5.9.0/include/uapi/linux/netconf.h Examining data/iproute2-5.9.0/include/uapi/linux/netdevice.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter/ipset/ip_set.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter/xt_set.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter/xt_tcpudp.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6.h Examining data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h Examining data/iproute2-5.9.0/include/uapi/linux/netlink.h Examining data/iproute2-5.9.0/include/uapi/linux/netlink_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/nexthop.h Examining data/iproute2-5.9.0/include/uapi/linux/packet_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/param.h Examining data/iproute2-5.9.0/include/uapi/linux/pfkeyv2.h Examining data/iproute2-5.9.0/include/uapi/linux/pkt_cls.h Examining data/iproute2-5.9.0/include/uapi/linux/pkt_sched.h Examining data/iproute2-5.9.0/include/uapi/linux/posix_types.h Examining data/iproute2-5.9.0/include/uapi/linux/rpl.h Examining data/iproute2-5.9.0/include/uapi/linux/rpl_iptunnel.h Examining data/iproute2-5.9.0/include/uapi/linux/rtnetlink.h Examining data/iproute2-5.9.0/include/uapi/linux/sctp.h Examining data/iproute2-5.9.0/include/uapi/linux/seg6.h Examining data/iproute2-5.9.0/include/uapi/linux/seg6_genl.h Examining data/iproute2-5.9.0/include/uapi/linux/seg6_hmac.h Examining data/iproute2-5.9.0/include/uapi/linux/seg6_iptunnel.h Examining data/iproute2-5.9.0/include/uapi/linux/seg6_local.h Examining data/iproute2-5.9.0/include/uapi/linux/snmp.h Examining data/iproute2-5.9.0/include/uapi/linux/sock_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/socket.h Examining data/iproute2-5.9.0/include/uapi/linux/sockios.h Examining data/iproute2-5.9.0/include/uapi/linux/stddef.h Examining data/iproute2-5.9.0/include/uapi/linux/sysinfo.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_bpf.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_connmark.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_csum.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_ct.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_ctinfo.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_defact.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_gact.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_gate.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_ife.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_ipt.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_mirred.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_mpls.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_nat.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_pedit.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_sample.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_skbedit.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_skbmod.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_tunnel_key.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_act/tc_vlan.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_ematch/tc_em_cmp.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_ematch/tc_em_ipt.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_ematch/tc_em_meta.h Examining data/iproute2-5.9.0/include/uapi/linux/tc_ematch/tc_em_nbyte.h Examining data/iproute2-5.9.0/include/uapi/linux/tcp.h Examining data/iproute2-5.9.0/include/uapi/linux/tcp_metrics.h Examining data/iproute2-5.9.0/include/uapi/linux/tipc.h Examining data/iproute2-5.9.0/include/uapi/linux/tipc_netlink.h Examining data/iproute2-5.9.0/include/uapi/linux/tipc_sockets_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/tls.h Examining data/iproute2-5.9.0/include/uapi/linux/types.h Examining data/iproute2-5.9.0/include/uapi/linux/udp.h Examining data/iproute2-5.9.0/include/uapi/linux/unix_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/veth.h Examining data/iproute2-5.9.0/include/uapi/linux/vm_sockets_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/xdp_diag.h Examining data/iproute2-5.9.0/include/uapi/linux/xfrm.h Examining data/iproute2-5.9.0/include/utils.h Examining data/iproute2-5.9.0/include/version.h Examining data/iproute2-5.9.0/include/xt-internal.h Examining data/iproute2-5.9.0/include/xtables.h Examining data/iproute2-5.9.0/ip/ila_common.h Examining data/iproute2-5.9.0/ip/ip6tunnel.c Examining data/iproute2-5.9.0/ip/ip_common.h Examining data/iproute2-5.9.0/ip/ipaddress.c Examining data/iproute2-5.9.0/ip/ipaddrlabel.c Examining data/iproute2-5.9.0/ip/ipfou.c Examining data/iproute2-5.9.0/ip/ipila.c Examining data/iproute2-5.9.0/ip/ipl2tp.c Examining data/iproute2-5.9.0/ip/iplink.c Examining data/iproute2-5.9.0/ip/iplink_bareudp.c Examining data/iproute2-5.9.0/ip/iplink_bond.c Examining data/iproute2-5.9.0/ip/iplink_bond_slave.c Examining data/iproute2-5.9.0/ip/iplink_bridge.c Examining data/iproute2-5.9.0/ip/iplink_bridge_slave.c Examining data/iproute2-5.9.0/ip/iplink_can.c Examining data/iproute2-5.9.0/ip/iplink_dummy.c Examining data/iproute2-5.9.0/ip/iplink_geneve.c Examining data/iproute2-5.9.0/ip/iplink_hsr.c Examining data/iproute2-5.9.0/ip/iplink_ifb.c Examining data/iproute2-5.9.0/ip/iplink_ipoib.c Examining data/iproute2-5.9.0/ip/iplink_ipvlan.c Examining data/iproute2-5.9.0/ip/iplink_macvlan.c Examining data/iproute2-5.9.0/ip/iplink_netdevsim.c Examining data/iproute2-5.9.0/ip/iplink_nlmon.c Examining data/iproute2-5.9.0/ip/iplink_rmnet.c Examining data/iproute2-5.9.0/ip/iplink_team.c Examining data/iproute2-5.9.0/ip/iplink_vcan.c Examining data/iproute2-5.9.0/ip/iplink_vlan.c Examining data/iproute2-5.9.0/ip/iplink_vrf.c Examining data/iproute2-5.9.0/ip/iplink_vxcan.c Examining data/iproute2-5.9.0/ip/iplink_vxlan.c Examining data/iproute2-5.9.0/ip/iplink_xdp.c Examining data/iproute2-5.9.0/ip/iplink_xstats.c Examining data/iproute2-5.9.0/ip/ipmacsec.c Examining data/iproute2-5.9.0/ip/ipmaddr.c Examining data/iproute2-5.9.0/ip/ipmonitor.c Examining data/iproute2-5.9.0/ip/ipmptcp.c Examining data/iproute2-5.9.0/ip/ipmroute.c Examining data/iproute2-5.9.0/ip/ipneigh.c Examining data/iproute2-5.9.0/ip/ipnetconf.c Examining data/iproute2-5.9.0/ip/ipnetns.c Examining data/iproute2-5.9.0/ip/ipnexthop.c Examining data/iproute2-5.9.0/ip/ipntable.c Examining data/iproute2-5.9.0/ip/ipprefix.c Examining data/iproute2-5.9.0/ip/iproute.c Examining data/iproute2-5.9.0/ip/iproute_lwtunnel.c Examining data/iproute2-5.9.0/ip/iprule.c Examining data/iproute2-5.9.0/ip/ipseg6.c Examining data/iproute2-5.9.0/ip/iptoken.c Examining data/iproute2-5.9.0/ip/iptunnel.c Examining data/iproute2-5.9.0/ip/iptuntap.c Examining data/iproute2-5.9.0/ip/ipvrf.c Examining data/iproute2-5.9.0/ip/ipxfrm.c Examining data/iproute2-5.9.0/ip/link_gre.c Examining data/iproute2-5.9.0/ip/link_gre6.c Examining data/iproute2-5.9.0/ip/link_ip6tnl.c Examining data/iproute2-5.9.0/ip/link_iptnl.c Examining data/iproute2-5.9.0/ip/link_veth.c Examining data/iproute2-5.9.0/ip/link_vti.c Examining data/iproute2-5.9.0/ip/link_vti6.c Examining data/iproute2-5.9.0/ip/link_xfrm.c Examining data/iproute2-5.9.0/ip/rtm_map.c Examining data/iproute2-5.9.0/ip/rtmon.c Examining data/iproute2-5.9.0/ip/static-syms.c Examining data/iproute2-5.9.0/ip/tcp_metrics.c Examining data/iproute2-5.9.0/ip/tunnel.c Examining data/iproute2-5.9.0/ip/tunnel.h Examining data/iproute2-5.9.0/ip/xfrm.h Examining data/iproute2-5.9.0/ip/xfrm_monitor.c Examining data/iproute2-5.9.0/ip/xfrm_policy.c Examining data/iproute2-5.9.0/ip/xfrm_state.c Examining data/iproute2-5.9.0/ip/ip.c Examining data/iproute2-5.9.0/lib/bpf.c Examining data/iproute2-5.9.0/lib/cg_map.c Examining data/iproute2-5.9.0/lib/color.c Examining data/iproute2-5.9.0/lib/coverity_model.c Examining data/iproute2-5.9.0/lib/exec.c Examining data/iproute2-5.9.0/lib/fs.c Examining data/iproute2-5.9.0/lib/inet_proto.c Examining data/iproute2-5.9.0/lib/json_print.c Examining data/iproute2-5.9.0/lib/json_writer.c Examining data/iproute2-5.9.0/lib/libgenl.c Examining data/iproute2-5.9.0/lib/libnetlink.c Examining data/iproute2-5.9.0/lib/ll_addr.c Examining data/iproute2-5.9.0/lib/ll_map.c Examining data/iproute2-5.9.0/lib/ll_proto.c Examining data/iproute2-5.9.0/lib/ll_types.c Examining data/iproute2-5.9.0/lib/mpls_ntop.c Examining data/iproute2-5.9.0/lib/mpls_pton.c Examining data/iproute2-5.9.0/lib/names.c Examining data/iproute2-5.9.0/lib/namespace.c Examining data/iproute2-5.9.0/lib/rt_names.c Examining data/iproute2-5.9.0/lib/utils.c Examining data/iproute2-5.9.0/misc/arpd.c Examining data/iproute2-5.9.0/misc/ifstat.c Examining data/iproute2-5.9.0/misc/lnstat.c Examining data/iproute2-5.9.0/misc/lnstat.h Examining data/iproute2-5.9.0/misc/lnstat_util.c Examining data/iproute2-5.9.0/misc/nstat.c Examining data/iproute2-5.9.0/misc/rtacct.c Examining data/iproute2-5.9.0/misc/ss.c Examining data/iproute2-5.9.0/misc/ss_util.h Examining data/iproute2-5.9.0/misc/ssfilter.h Examining data/iproute2-5.9.0/misc/ssfilter_check.c Examining data/iproute2-5.9.0/netem/maketable.c Examining data/iproute2-5.9.0/netem/normal.c Examining data/iproute2-5.9.0/netem/pareto.c Examining data/iproute2-5.9.0/netem/paretonormal.c Examining data/iproute2-5.9.0/netem/stats.c Examining data/iproute2-5.9.0/rdma/dev.c Examining data/iproute2-5.9.0/rdma/include/uapi/rdma/ib_user_sa.h Examining data/iproute2-5.9.0/rdma/include/uapi/rdma/ib_user_verbs.h Examining data/iproute2-5.9.0/rdma/include/uapi/rdma/rdma_netlink.h Examining data/iproute2-5.9.0/rdma/include/uapi/rdma/rdma_user_cm.h Examining data/iproute2-5.9.0/rdma/link.c Examining data/iproute2-5.9.0/rdma/rdma.c Examining data/iproute2-5.9.0/rdma/rdma.h Examining data/iproute2-5.9.0/rdma/res-cmid.c Examining data/iproute2-5.9.0/rdma/res-cq.c Examining data/iproute2-5.9.0/rdma/res-mr.c Examining data/iproute2-5.9.0/rdma/res-pd.c Examining data/iproute2-5.9.0/rdma/res-qp.c Examining data/iproute2-5.9.0/rdma/res.c Examining data/iproute2-5.9.0/rdma/res.h Examining data/iproute2-5.9.0/rdma/stat-mr.c Examining data/iproute2-5.9.0/rdma/stat.c Examining data/iproute2-5.9.0/rdma/stat.h Examining data/iproute2-5.9.0/rdma/sys.c Examining data/iproute2-5.9.0/rdma/utils.c Examining data/iproute2-5.9.0/tc/e_bpf.c Examining data/iproute2-5.9.0/tc/em_canid.c Examining data/iproute2-5.9.0/tc/em_cmp.c Examining data/iproute2-5.9.0/tc/em_ipset.c Examining data/iproute2-5.9.0/tc/em_ipt.c Examining data/iproute2-5.9.0/tc/em_meta.c Examining data/iproute2-5.9.0/tc/em_nbyte.c Examining data/iproute2-5.9.0/tc/em_u32.c Examining data/iproute2-5.9.0/tc/f_basic.c Examining data/iproute2-5.9.0/tc/f_bpf.c Examining data/iproute2-5.9.0/tc/f_cgroup.c Examining data/iproute2-5.9.0/tc/f_flow.c Examining data/iproute2-5.9.0/tc/f_flower.c Examining data/iproute2-5.9.0/tc/f_fw.c Examining data/iproute2-5.9.0/tc/f_matchall.c Examining data/iproute2-5.9.0/tc/f_route.c Examining data/iproute2-5.9.0/tc/f_rsvp.c Examining data/iproute2-5.9.0/tc/f_tcindex.c Examining data/iproute2-5.9.0/tc/f_u32.c Examining data/iproute2-5.9.0/tc/m_action.c Examining data/iproute2-5.9.0/tc/m_bpf.c Examining data/iproute2-5.9.0/tc/m_connmark.c Examining data/iproute2-5.9.0/tc/m_csum.c Examining data/iproute2-5.9.0/tc/m_ct.c Examining data/iproute2-5.9.0/tc/m_ctinfo.c Examining data/iproute2-5.9.0/tc/m_ematch.c Examining data/iproute2-5.9.0/tc/m_ematch.h Examining data/iproute2-5.9.0/tc/m_estimator.c Examining data/iproute2-5.9.0/tc/m_gact.c Examining data/iproute2-5.9.0/tc/m_gate.c Examining data/iproute2-5.9.0/tc/m_ife.c Examining data/iproute2-5.9.0/tc/m_ipt.c Examining data/iproute2-5.9.0/tc/m_mirred.c Examining data/iproute2-5.9.0/tc/m_mpls.c Examining data/iproute2-5.9.0/tc/m_nat.c Examining data/iproute2-5.9.0/tc/m_pedit.c Examining data/iproute2-5.9.0/tc/m_pedit.h Examining data/iproute2-5.9.0/tc/m_police.c Examining data/iproute2-5.9.0/tc/m_sample.c Examining data/iproute2-5.9.0/tc/m_simple.c Examining data/iproute2-5.9.0/tc/m_skbedit.c Examining data/iproute2-5.9.0/tc/m_skbmod.c Examining data/iproute2-5.9.0/tc/m_tunnel_key.c Examining data/iproute2-5.9.0/tc/m_vlan.c Examining data/iproute2-5.9.0/tc/m_xt.c Examining data/iproute2-5.9.0/tc/m_xt_old.c Examining data/iproute2-5.9.0/tc/p_eth.c Examining data/iproute2-5.9.0/tc/p_icmp.c Examining data/iproute2-5.9.0/tc/p_ip.c Examining data/iproute2-5.9.0/tc/p_ip6.c Examining data/iproute2-5.9.0/tc/p_tcp.c Examining data/iproute2-5.9.0/tc/p_udp.c Examining data/iproute2-5.9.0/tc/q_atm.c Examining data/iproute2-5.9.0/tc/q_cake.c Examining data/iproute2-5.9.0/tc/q_cbq.c Examining data/iproute2-5.9.0/tc/q_cbs.c Examining data/iproute2-5.9.0/tc/q_choke.c Examining data/iproute2-5.9.0/tc/q_clsact.c Examining data/iproute2-5.9.0/tc/q_codel.c Examining data/iproute2-5.9.0/tc/q_drr.c Examining data/iproute2-5.9.0/tc/q_dsmark.c Examining data/iproute2-5.9.0/tc/q_etf.c Examining data/iproute2-5.9.0/tc/q_ets.c Examining data/iproute2-5.9.0/tc/q_fifo.c Examining data/iproute2-5.9.0/tc/q_fq.c Examining data/iproute2-5.9.0/tc/q_fq_codel.c Examining data/iproute2-5.9.0/tc/q_fq_pie.c Examining data/iproute2-5.9.0/tc/q_gred.c Examining data/iproute2-5.9.0/tc/q_hfsc.c Examining data/iproute2-5.9.0/tc/q_hhf.c Examining data/iproute2-5.9.0/tc/q_htb.c Examining data/iproute2-5.9.0/tc/q_ingress.c Examining data/iproute2-5.9.0/tc/q_mqprio.c Examining data/iproute2-5.9.0/tc/q_multiq.c Examining data/iproute2-5.9.0/tc/q_netem.c Examining data/iproute2-5.9.0/tc/q_pie.c Examining data/iproute2-5.9.0/tc/q_plug.c Examining data/iproute2-5.9.0/tc/q_prio.c Examining data/iproute2-5.9.0/tc/q_qfq.c Examining data/iproute2-5.9.0/tc/q_red.c Examining data/iproute2-5.9.0/tc/q_rr.c Examining data/iproute2-5.9.0/tc/q_sfb.c Examining data/iproute2-5.9.0/tc/q_sfq.c Examining data/iproute2-5.9.0/tc/q_skbprio.c Examining data/iproute2-5.9.0/tc/q_taprio.c Examining data/iproute2-5.9.0/tc/q_tbf.c Examining data/iproute2-5.9.0/tc/static-syms.c Examining data/iproute2-5.9.0/tc/tc.c Examining data/iproute2-5.9.0/tc/tc_cbq.c Examining data/iproute2-5.9.0/tc/tc_cbq.h Examining data/iproute2-5.9.0/tc/tc_class.c Examining data/iproute2-5.9.0/tc/tc_common.h Examining data/iproute2-5.9.0/tc/tc_core.c Examining data/iproute2-5.9.0/tc/tc_core.h Examining data/iproute2-5.9.0/tc/tc_estimator.c Examining data/iproute2-5.9.0/tc/tc_exec.c Examining data/iproute2-5.9.0/tc/tc_filter.c Examining data/iproute2-5.9.0/tc/tc_monitor.c Examining data/iproute2-5.9.0/tc/tc_qdisc.c Examining data/iproute2-5.9.0/tc/tc_qevent.c Examining data/iproute2-5.9.0/tc/tc_qevent.h Examining data/iproute2-5.9.0/tc/tc_red.c Examining data/iproute2-5.9.0/tc/tc_red.h Examining data/iproute2-5.9.0/tc/tc_stab.c Examining data/iproute2-5.9.0/tc/tc_util.c Examining data/iproute2-5.9.0/tc/tc_util.h Examining data/iproute2-5.9.0/testsuite/tools/generate_nlmsg.c Examining data/iproute2-5.9.0/tipc/bearer.c Examining data/iproute2-5.9.0/tipc/bearer.h Examining data/iproute2-5.9.0/tipc/cmdl.c Examining data/iproute2-5.9.0/tipc/cmdl.h Examining data/iproute2-5.9.0/tipc/link.c Examining data/iproute2-5.9.0/tipc/link.h Examining data/iproute2-5.9.0/tipc/media.c Examining data/iproute2-5.9.0/tipc/media.h Examining data/iproute2-5.9.0/tipc/misc.c Examining data/iproute2-5.9.0/tipc/misc.h Examining data/iproute2-5.9.0/tipc/msg.c Examining data/iproute2-5.9.0/tipc/msg.h Examining data/iproute2-5.9.0/tipc/nametable.c Examining data/iproute2-5.9.0/tipc/nametable.h Examining data/iproute2-5.9.0/tipc/node.c Examining data/iproute2-5.9.0/tipc/node.h Examining data/iproute2-5.9.0/tipc/peer.c Examining data/iproute2-5.9.0/tipc/peer.h Examining data/iproute2-5.9.0/tipc/socket.c Examining data/iproute2-5.9.0/tipc/socket.h Examining data/iproute2-5.9.0/tipc/tipc.c FINAL RESULTS: data/iproute2-5.9.0/ip/iptuntap.c:319:9: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. err = readlink(*fd_path, linkbuf, linkbuf_len - 1); data/iproute2-5.9.0/lib/fs.c:210:13: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. link_len = readlink(fd_path, link_buf, sizeof(link_buf) - 1); data/iproute2-5.9.0/misc/nstat.c:140:4: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(info_source, buf+1, sizeof(info_source)-1); data/iproute2-5.9.0/misc/nstat.c:206:3: [5] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. Risk is high; the length parameter appears to be a constant, instead of computing the number of characters left. strncat(idbuf, buf, sizeof(idbuf) - 1); data/iproute2-5.9.0/misc/ss.c:640:15: [5] (race) readlink: This accepts filename arguments; if an attacker can move those files or change the link content, a race condition results. Also, it does not terminate with ASCII NUL. (CWE-362, CWE-20). Reconsider approach. link_len = readlink(name, lnk, sizeof(lnk)-1); data/iproute2-5.9.0/devlink/devlink.c:72:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. static void __attribute__((format(printf, 1, 2))) data/iproute2-5.9.0/devlink/devlink.c:78:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, ap); data/iproute2-5.9.0/devlink/devlink.c:82:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. static void __attribute__((format(printf, 1, 2))) data/iproute2-5.9.0/devlink/devlink.c:92:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/iproute2-5.9.0/devlink/devlink.c:97:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. static void __attribute__((format(printf, 2, 3))) data/iproute2-5.9.0/devlink/devlink.c:104:8: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ret = vprintf(fmt, ap); data/iproute2-5.9.0/devlink/devlink.c:112:35: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. static void __attribute__((format(printf, 1, 2))) data/iproute2-5.9.0/devlink/devlink.c:120:2: [4] (format) vprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vprintf(fmt, ap); data/iproute2-5.9.0/devlink/devlink.c:1999:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s/%s", bus_name, dev_name); data/iproute2-5.9.0/devlink/devlink.c:2094:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s/%s/%d", bus_name, dev_name, port_index); data/iproute2-5.9.0/devlink/devlink.c:2096:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s", ifname); data/iproute2-5.9.0/devlink/devlink.c:6458:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "%s/%s/%s", bus_name, dev_name, region_name); data/iproute2-5.9.0/include/json_writer.h:32:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))) data/iproute2-5.9.0/include/utils.h:285:26: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__ ((format (printf, (pos_str), (pos_args)))) data/iproute2-5.9.0/include/xtables.h:434:103: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. void (*exit_err)(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3))); data/iproute2-5.9.0/ip/ip6tunnel.c:327:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(p2->name, p1->name); data/iproute2-5.9.0/ip/ipaddress.c:176:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(ifr.ifr_name, rta_getattr_str(tb[IFLA_IFNAME])); data/iproute2-5.9.0/ip/iplink.c:159:2: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(buf, sizeof(buf), LIBDIR "/ip/link_%s.so", id); data/iproute2-5.9.0/ip/iplink.c:328:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(msg, data/iproute2-5.9.0/ip/iplink_macvlan.c:26:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, __VA_ARGS__); \ data/iproute2-5.9.0/ip/ipmaddr.c:101:3: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(buf, "%d%s%d%d%s", &m.index, m.name, &m.users, &st, data/iproute2-5.9.0/ip/ipmaddr.c:144:4: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(buf, "%d%s", &m.index, m.name); data/iproute2-5.9.0/ip/ipmaddr.c:177:3: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(buf, "%d%s%s%d", &m.index, m.name, hexa, &m.users); data/iproute2-5.9.0/ip/ipmroute.c:38:2: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(stderr, data/iproute2-5.9.0/ip/ipnetns.c:219:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(c->name, name); data/iproute2-5.9.0/ip/ipnetns.c:298:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(name, entry->d_name); data/iproute2-5.9.0/ip/ipseg6.c:233:16: [4] (misc) getpass: This function is obsolete and not portable. It was in SUSv2 but removed by POSIX.2. What it does exactly varies considerably between systems, particularly in where its prompt is displayed and where it gets its data (e.g., /dev/tty, stdin, stderr, etc.). In addition, some implementations overflow buffers. (CWE-676, CWE-120, CWE-20). Make the specific calls to do exactly what you want. If you continue to use it, or write your own, be sure to zero the password as soon as possible to avoid leaving the cleartext password visible in the process' address space. opts.pass = getpass(HMAC_KEY_PROMPT); data/iproute2-5.9.0/ip/ipvrf.c:420:2: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(path, CGRP_PROC_FILE); data/iproute2-5.9.0/ip/xfrm.h:60:4: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fp, s "%s", (flags ? " " : "")); \ data/iproute2-5.9.0/lib/bpf.c:1204:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, vl); data/iproute2-5.9.0/lib/bpf.c:1474:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(tmp, sub); data/iproute2-5.9.0/lib/bpf.c:2723:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(ptr, "%i %s\n", id, path) != 2 && data/iproute2-5.9.0/lib/bpf.c:2724:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(ptr, "%i %s #", id, path) != 2) { data/iproute2-5.9.0/lib/bpf.c:2725:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(path, ptr); data/iproute2-5.9.0/lib/cg_map.c:61:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(cg->path, path); data/iproute2-5.9.0/lib/color.c:137:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 3, 4))) data/iproute2-5.9.0/lib/color.c:146:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ret = vfprintf(fp, fmt, args); data/iproute2-5.9.0/lib/color.c:153:9: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. ret += vfprintf(fp, fmt, args); data/iproute2-5.9.0/lib/exec.c:42:6: [4] (shell) execvp: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. if (execvp(cmd, argv) < 0) data/iproute2-5.9.0/lib/json_print.c:125:24: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 4, 0))) \ data/iproute2-5.9.0/lib/json_print.c:159:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(format, SPRINT_BSIZE, \ data/iproute2-5.9.0/lib/json_writer.c:155:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 2, 3))) data/iproute2-5.9.0/lib/json_writer.c:162:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(self->out, fmt, ap); data/iproute2-5.9.0/lib/ll_map.c:93:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(im->name, ifname); data/iproute2-5.9.0/lib/names.c:36:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(p, "%x:%x %s\n", &maj, &min, name) == 3) { data/iproute2-5.9.0/lib/names.c:38:14: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. } else if (sscanf(p, "%x:%x %s #", &maj, &min, name) == 3) { data/iproute2-5.9.0/lib/names.c:40:14: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. } else if (sscanf(p, "0x%x %s\n", id, name) != 2 && data/iproute2-5.9.0/lib/names.c:41:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "0x%x %s #", id, name) != 2 && data/iproute2-5.9.0/lib/names.c:42:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "%d %s\n", id, name) != 2 && data/iproute2-5.9.0/lib/names.c:43:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "%d %s #", id, name) != 2) { data/iproute2-5.9.0/lib/names.c:44:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(name, p); data/iproute2-5.9.0/lib/rt_names.c:51:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(p, "0x%x %s\n", id, namebuf) != 2 && data/iproute2-5.9.0/lib/rt_names.c:52:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "0x%x %s #", id, namebuf) != 2 && data/iproute2-5.9.0/lib/rt_names.c:53:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "%d %s\n", id, namebuf) != 2 && data/iproute2-5.9.0/lib/rt_names.c:54:5: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. sscanf(p, "%d %s #", id, namebuf) != 2) { data/iproute2-5.9.0/lib/rt_names.c:55:4: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(namebuf, p); data/iproute2-5.9.0/lib/rt_names.c:177:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), CONFDIR "/rt_protos.d/%s", data/iproute2-5.9.0/lib/rt_names.c:409:3: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(path, sizeof(path), data/iproute2-5.9.0/lib/utils.c:1355:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(*linep, line1); data/iproute2-5.9.0/misc/arpd.c:127:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "/proc/sys/net/ipv4/neigh/%s/mcast_solicit", ifnames[i]); data/iproute2-5.9.0/misc/arpd.c:138:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "/proc/sys/net/ipv4/neigh/%s/app_solicit", ifnames[i]); data/iproute2-5.9.0/misc/arpd.c:160:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "/proc/sys/net/ipv4/neigh/%s/mcast_solicit", ifnames[i]); data/iproute2-5.9.0/misc/arpd.c:167:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf, "/proc/sys/net/ipv4/neigh/%s/app_solicit", ifnames[i]); data/iproute2-5.9.0/misc/arpd.c:706:8: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buf, "%u%s%s", &k.iface, ipbuf, macbuf) != 3) { data/iproute2-5.9.0/misc/nstat.c:144:8: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. nr = sscanf(buf, "%s%llu%lg", idbuf, &val, &rate); data/iproute2-5.9.0/misc/ss.c:1015:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 1, 2))) data/iproute2-5.9.0/misc/ss.c:1035:8: [4] (format) vsnprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. len = vsnprintf(pos, buf_chunk_avail(buffer.tail), fmt, args); data/iproute2-5.9.0/misc/ss.c:1458:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(buf+strlen(buf), "%d%s", secs, msecs ? "." : "sec"); data/iproute2-5.9.0/misc/ss.c:1477:13: [4] (shell) popen: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. FILE *fp = popen("/usr/sbin/rpcinfo -p 2>/dev/null", "r"); data/iproute2-5.9.0/misc/ss.c:1491:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buf, "%u %*d %s %u %s", data/iproute2-5.9.0/misc/ss.c:4088:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(buf, "%x: %x %x %x %x %x %d %s", data/iproute2-5.9.0/rdma/rdma.h:24:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define pr_err(args...) fprintf(stderr, ##args) data/iproute2-5.9.0/rdma/rdma.h:25:25: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define pr_out(args...) fprintf(stdout, ##args) data/iproute2-5.9.0/rdma/stat.c:77:5: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(output, auto_params[i].name); data/iproute2-5.9.0/tc/em_canid.c:62:6: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(a->data, "%"SCNx32 ":" "%"SCNx32, &can_id, &can_mask) != 2) { data/iproute2-5.9.0/tc/em_canid.c:63:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. If the scanf format is influenceable by an attacker, it's exploitable. if (sscanf(a->data, "%"SCNx32, &can_id) != 1) { data/iproute2-5.9.0/tc/em_canid.c:161:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, "eff 0x%"PRIX32, data/iproute2-5.9.0/tc/em_canid.c:164:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, "eff 0x%"PRIX32":0x%"PRIX32, data/iproute2-5.9.0/tc/em_canid.c:169:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, "sff 0x%"PRIX32, data/iproute2-5.9.0/tc/em_canid.c:172:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(fd, "sff 0x%"PRIX32":0x%"PRIX32, data/iproute2-5.9.0/tc/f_flower.c:1078:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&key[key_len], token); data/iproute2-5.9.0/tc/f_flower.c:1100:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(&mask[mask_len], slash + 1); data/iproute2-5.9.0/tc/f_flower.c:1137:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mask, slash); data/iproute2-5.9.0/tc/f_flower.c:1144:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, str); data/iproute2-5.9.0/tc/f_flower.c:1175:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(mask, slash); data/iproute2-5.9.0/tc/f_flower.c:1187:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(key, str); data/iproute2-5.9.0/tc/f_flower.c:1942:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. done = sprintf(out, "%s", data/iproute2-5.9.0/tc/f_flower.c:1948:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(out + done, "/%s", data/iproute2-5.9.0/tc/f_flower.c:1956:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%s", name); data/iproute2-5.9.0/tc/f_flower.c:2094:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. done = sprintf(out, "%s", rt_addr_n2a_rta(family, addr_attr)); data/iproute2-5.9.0/tc/f_flower.c:2097:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(out + done, "/%s", rt_addr_n2a_rta(family, mask_attr)); data/iproute2-5.9.0/tc/f_flower.c:2102:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%s", name); data/iproute2-5.9.0/tc/f_flower.c:2137:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%s", name); data/iproute2-5.9.0/tc/f_flower.c:2157:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%s", name); data/iproute2-5.9.0/tc/f_flower.c:2184:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. done += sprintf(out + done, "+%s", data/iproute2-5.9.0/tc/f_flower.c:2187:12: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. done += sprintf(out + done, "-%s", data/iproute2-5.9.0/tc/f_flower.c:2251:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%u", name); data/iproute2-5.9.0/tc/f_flower.c:2288:11: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. slen += sprintf(strbuf + slen, "%04x:%02x:%s", data/iproute2-5.9.0/tc/f_flower.c:2362:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. len += sprintf(&out[len], "%s/%s,", key_token, mask_token); data/iproute2-5.9.0/tc/f_flower.c:2450:10: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. done = sprintf(out, "%s", value_str); data/iproute2-5.9.0/tc/f_flower.c:2458:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%s", name); data/iproute2-5.9.0/tc/f_flower.c:2475:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%u", name); data/iproute2-5.9.0/tc/f_tcindex.c:163:3: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, fall_through ? "fall_through " : "pass_on "); data/iproute2-5.9.0/tc/m_ct.c:334:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. return sprintf(buf, "%s%d", prefix, rta_getattr_be16(attr)); data/iproute2-5.9.0/tc/m_ct.c:355:9: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. return sprintf(buf, "%s%s", prefix, rt_addr_n2a_rta(family, attr)); data/iproute2-5.9.0/tc/m_ematch.c:71:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(p, "%d %s", &id, namebuf) != 2) { data/iproute2-5.9.0/tc/m_ematch.c:109:7: [4] (buffer) sscanf: The scanf() family's %s operation, without a limit specification, permits buffer overflows (CWE-120, CWE-20). Specify a limit to %s, or use a different input function. if (sscanf(p, "%d %s", &id, namebuf) != 2) { data/iproute2-5.9.0/tc/m_ematch.c:282:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 5, 6))) data/iproute2-5.9.0/tc/m_ematch.c:289:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, fmt, a); data/iproute2-5.9.0/tc/m_ematch.h:104:23: [4] (format) printf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. __attribute__((format(printf, 5, 6))) data/iproute2-5.9.0/tc/m_ipt.c:80:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, msg, args); data/iproute2-5.9.0/tc/m_ipt.c:173:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(new_name, name); data/iproute2-5.9.0/tc/m_ipt.c:174:2: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(lname, name); data/iproute2-5.9.0/tc/m_ipt.c:193:2: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/libxt_%s.so", lib_dir, new_name); data/iproute2-5.9.0/tc/m_ipt.c:197:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/libipt_%s.so", lib_dir, new_name); data/iproute2-5.9.0/tc/m_ipt.c:201:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/libxt_%s.so", lib_dir, lname); data/iproute2-5.9.0/tc/m_ipt.c:206:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(path, "%s/libipt_%s.so", lib_dir, lname); data/iproute2-5.9.0/tc/m_ipt.c:272:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(target->t->u.user.name, target->name); data/iproute2-5.9.0/tc/m_tunnel_key.c:569:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(strbuf, "%04x:%02x:%s", clss, type, data); data/iproute2-5.9.0/tc/m_xt_old.c:151:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, msg, args); data/iproute2-5.9.0/tc/m_xt_old.c:180:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(target->t->u.user.name, target->name); data/iproute2-5.9.0/tc/q_cake.c:776:5: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, name); \ data/iproute2-5.9.0/tc/q_cake.c:778:6: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. fprintf(f, " %12" fmts, val); \ data/iproute2-5.9.0/tc/q_gred.c:32:34: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define DPRINTF(format, args...) fprintf(stderr, format, ##args) data/iproute2-5.9.0/tc/q_tbf.c:293:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b1, "%s/%u", sprint_size(buffer, b2), data/iproute2-5.9.0/tc/q_tbf.c:317:5: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(b1, "%s/%u", sprint_size(mtu, b2), data/iproute2-5.9.0/tc/tc_class.c:210:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(spaces, "%-*s", add_spaces, ""); data/iproute2-5.9.0/tc/tc_class.c:211:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, spaces); data/iproute2-5.9.0/tc/tc_class.c:247:3: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, str); data/iproute2-5.9.0/tc/tc_class.c:257:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(str, " %s ", kind); data/iproute2-5.9.0/tc/tc_class.c:258:4: [4] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). strcat(buf, str); data/iproute2-5.9.0/tc/tc_util.c:957:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, "\n %s %%u", name); data/iproute2-5.9.0/tc/tc_util.c:963:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(mask_name, "%s_mask", name); data/iproute2-5.9.0/tc/tc_util.c:966:4: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%u", mask_name); data/iproute2-5.9.0/tc/tc_util.c:975:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(namefrm, " %s %%s", name); data/iproute2-5.9.0/tipc/link.c:919:3: [4] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. sprintf(full_state, "%s%c", addr_str, state); data/iproute2-5.9.0/tipc/node.c:224:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(input.key.alg_name, opt_algname->val); data/iproute2-5.9.0/devlink/devlink.c:7814:16: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt_long(argc, argv, "Vfb:njpvsN:", data/iproute2-5.9.0/lib/bpf.c:748:24: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *mnt_env = getenv(BPF_ENV_MNT); data/iproute2-5.9.0/lib/bpf.c:900:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. uds_name = getenv(BPF_ENV_UDS); data/iproute2-5.9.0/lib/color.c:124:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *p = getenv("COLORFGBG"); data/iproute2-5.9.0/lib/utils.c:946:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("HZ")) data/iproute2-5.9.0/lib/utils.c:947:15: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. return atoi(getenv("HZ")) ? : HZ; data/iproute2-5.9.0/lib/utils.c:949:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("PROC_NET_PSCHED")) data/iproute2-5.9.0/lib/utils.c:951:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. "%s", getenv("PROC_NET_PSCHED")); data/iproute2-5.9.0/lib/utils.c:952:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. else if (getenv("PROC_ROOT")) data/iproute2-5.9.0/lib/utils.c:954:22: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. "%s/net/psched", getenv("PROC_ROOT")); data/iproute2-5.9.0/misc/arpd.c:592:16: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt(argc, argv, "h?b:lf:a:n:p:kR:B:")) != EOF) { data/iproute2-5.9.0/misc/ifstat.c:675:28: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. getpid(), (unsigned long)random(), scan_interval/1000, time_constant/1000); data/iproute2-5.9.0/misc/ifstat.c:825:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, "hjpvVzrnasd:t:ex:", data/iproute2-5.9.0/misc/ifstat.c:924:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("IFSTAT_HISTORY")) data/iproute2-5.9.0/misc/ifstat.c:926:11: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. "%s", getenv("IFSTAT_HISTORY")); data/iproute2-5.9.0/misc/lnstat.c:271:14: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((c = getopt_long(argc, argv, "Vc:djpf:h?i:k:s:w:", data/iproute2-5.9.0/misc/nstat.c:53:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *p = getenv(env); data/iproute2-5.9.0/misc/nstat.c:56:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("PROC_ROOT") ? : "/proc"; data/iproute2-5.9.0/misc/nstat.c:486:28: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. getpid(), (unsigned long)random(), scan_interval/1000, time_constant/1000); data/iproute2-5.9.0/misc/nstat.c:588:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, "h?vVzrnasd:t:jp", data/iproute2-5.9.0/misc/nstat.c:670:19: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((hist_name = getenv("NSTAT_HISTORY")) == NULL) { data/iproute2-5.9.0/misc/rtacct.c:48:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *p = getenv(env); data/iproute2-5.9.0/misc/rtacct.c:51:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("PROC_ROOT") ? : "/proc"; data/iproute2-5.9.0/misc/rtacct.c:364:43: [3] (random) random: This function is not sufficiently random for security-related functions such as key and nonce creation (CWE-327). Use a more secure technique for acquiring random values. (unsigned int) getpid(), (unsigned long)random(), data/iproute2-5.9.0/misc/rtacct.c:437:15: [3] (buffer) getopt: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt(argc, argv, "h?vVzrM:nasd:t:")) != EOF) { data/iproute2-5.9.0/misc/rtacct.c:532:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("RTACCT_HISTORY")) data/iproute2-5.9.0/misc/rtacct.c:533:48: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. snprintf(hist_name, sizeof(hist_name), "%s", getenv("RTACCT_HISTORY")); data/iproute2-5.9.0/misc/ss.c:480:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *p = getenv(env); data/iproute2-5.9.0/misc/ss.c:484:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. p = getenv("PROC_ROOT") ? : "/proc"; data/iproute2-5.9.0/misc/ss.c:576:21: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. const char *root = getenv("PROC_ROOT") ? : "/proc/"; data/iproute2-5.9.0/misc/ss.c:3619:18: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if ((fp = fopen(getenv("TCPDIAG_FILE"), "r")) == NULL) { data/iproute2-5.9.0/misc/ss.c:3696:6: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (getenv("TCPDIAG_FILE")) data/iproute2-5.9.0/misc/ss.c:3699:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_TCP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3699:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_TCP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3752:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_MPTCP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3752:36: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_MPTCP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3764:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_DCCP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3764:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_DCCP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3776:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_SCTP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3776:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_SCTP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3830:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_UDP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3830:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_UDP") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:3870:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_RAW") && !getenv("PROC_ROOT") && data/iproute2-5.9.0/misc/ss.c:3870:34: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_RAW") && !getenv("PROC_ROOT") && data/iproute2-5.9.0/misc/ss.c:4066:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_UNIX") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:4066:35: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_UNIX") && !getenv("PROC_ROOT") data/iproute2-5.9.0/misc/ss.c:4423:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_PACKET") && !getenv("PROC_ROOT") && data/iproute2-5.9.0/misc/ss.c:4423:37: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_PACKET") && !getenv("PROC_ROOT") && data/iproute2-5.9.0/misc/ss.c:4620:5: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. getenv("PROC_ROOT") ? : "/proc", pid); data/iproute2-5.9.0/misc/ss.c:4734:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_NETLINK") && !getenv("PROC_ROOT") && data/iproute2-5.9.0/misc/ss.c:4734:38: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. if (!getenv("PROC_NET_NETLINK") && !getenv("PROC_ROOT") && data/iproute2-5.9.0/misc/ss.c:5358:15: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((ch = getopt_long(argc, argv, data/iproute2-5.9.0/rdma/rdma.c:132:16: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. while ((opt = getopt_long(argc, argv, ":Vhdrpjfb:", data/iproute2-5.9.0/tc/em_ipt.c:98:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "6m:", tmp_tcipt_globals.opts, data/iproute2-5.9.0/tc/m_ipt.c:294:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("IPTABLES_LIB_DIR"); data/iproute2-5.9.0/tc/m_ipt.c:314:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "j:", opts, NULL); data/iproute2-5.9.0/tc/m_ipt.c:438:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("IPTABLES_LIB_DIR"); data/iproute2-5.9.0/tc/m_xt.c:113:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("XTABLES_LIBDIR"); data/iproute2-5.9.0/tc/m_xt.c:115:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("IPTABLES_LIB_DIR"); data/iproute2-5.9.0/tc/m_xt.c:181:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "j:", tmp_tcipt_globals.opts, NULL); data/iproute2-5.9.0/tc/m_xt_old.c:195:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("XTABLES_LIBDIR"); data/iproute2-5.9.0/tc/m_xt_old.c:197:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("IPTABLES_LIB_DIR"); data/iproute2-5.9.0/tc/m_xt_old.c:239:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. c = getopt_long(argc, argv, "j:", opts, NULL); data/iproute2-5.9.0/tc/tc_util.c:68:12: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. lib_dir = getenv("TC_LIB_DIR"); data/iproute2-5.9.0/tipc/tipc.c:78:7: [3] (buffer) getopt_long: Some older implementations do not protect against internal buffer overflows (CWE-120, CWE-20). Check implementation on installation, or limit the size of all string inputs. i = getopt_long(argc, argv, "hjp", long_options, &option_index); data/iproute2-5.9.0/bridge/bridge.c:104:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *largv[100]; data/iproute2-5.9.0/bridge/fdb.c:53:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[32]; data/iproute2-5.9.0/bridge/fdb.c:68:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%#x", s); data/iproute2-5.9.0/bridge/fdb.c:70:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "state=%#x", s); data/iproute2-5.9.0/bridge/fdb.c:329:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). filter_vlan = atoi(*argv); data/iproute2-5.9.0/bridge/fdb.c:388:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/bridge/fdb.c:398:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[ETH_ALEN]; data/iproute2-5.9.0/bridge/fdb.c:472:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vid = atoi(*argv); data/iproute2-5.9.0/bridge/fdb.c:554:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/bridge/fdb.c:564:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[ETH_ALEN]; data/iproute2-5.9.0/bridge/fdb.c:594:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vlan = atoi(*argv); data/iproute2-5.9.0/bridge/link.c:299:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/iproute2-5.9.0/bridge/link.c:369:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). cost = atoi(*argv); data/iproute2-5.9.0/bridge/link.c:372:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). priority = atoi(*argv); data/iproute2-5.9.0/bridge/mdb.c:47:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char tbuf[32]; data/iproute2-5.9.0/bridge/mdb.c:322:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). filter_vlan = atoi(*argv); data/iproute2-5.9.0/bridge/mdb.c:374:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/bridge/mdb.c:402:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vid = atoi(*argv); data/iproute2-5.9.0/bridge/monitor.c:125:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/bridge/vlan.c:139:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/bridge/vlan.c:168:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vid = atoi(*argv); data/iproute2-5.9.0/bridge/vlan.c:169:15: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vid_end = atoi(p); data/iproute2-5.9.0/bridge/vlan.c:172:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). vid = atoi(*argv); data/iproute2-5.9.0/bridge/vlan.c:282:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char end[64]; data/iproute2-5.9.0/bridge/vlan.c:352:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[VLAN_ID_LEN + 1]; data/iproute2-5.9.0/bridge/vlan.c:539:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). filter_vlan = atoi(*argv); data/iproute2-5.9.0/devlink/devlink.c:70:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char g_indent_str[INDENT_STR_MAXLEN + 1] = ""; data/iproute2-5.9.0/devlink/devlink.c:350:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char port_function_hw_addr[MAX_ADDR_LEN]; data/iproute2-5.9.0/devlink/devlink.c:1333:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char err_msg[DL_ARGS_REQUIRED_MAX_ERR_LEN]; data/iproute2-5.9.0/devlink/devlink.c:1997:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/devlink/devlink.c:2088:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[64]; data/iproute2-5.9.0/devlink/devlink.c:4125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[32]; data/iproute2-5.9.0/devlink/devlink.c:4129:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u", occ_item->index); data/iproute2-5.9.0/devlink/devlink.c:5469:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(path, parent_resource->name, data/iproute2-5.9.0/devlink/devlink.c:5472:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(path, del, strlen(del)); data/iproute2-5.9.0/devlink/devlink.c:5719:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/devlink/devlink.c:6456:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/devlink/devlink.c:7086:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dump_date[HEALTH_REPORTER_TIMESTAMP_FMT_LEN]; data/iproute2-5.9.0/devlink/devlink.c:7087:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dump_time[HEALTH_REPORTER_TIMESTAMP_FMT_LEN]; data/iproute2-5.9.0/devlink/devlink.c:7115:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dump_date[HEALTH_REPORTER_TIMESTAMP_FMT_LEN]; data/iproute2-5.9.0/devlink/devlink.c:7116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dump_time[HEALTH_REPORTER_TIMESTAMP_FMT_LEN]; data/iproute2-5.9.0/devlink/devlink.c:7765:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *largv[100]; data/iproute2-5.9.0/genl/ctrl.c:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[GENL_NAMSIZ]; data/iproute2-5.9.0/genl/ctrl.c:223:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/genl/genl.c:58:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/genl/genl_utils.h:10:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[16]; data/iproute2-5.9.0/include/bpf_api.h:235:9: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. #ifndef memcpy data/iproute2-5.9.0/include/bpf_api.h:236:10: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. # define memcpy(d, s, n) __builtin_memcpy((d), (s), (n)) data/iproute2-5.9.0/include/bpf_scm.h:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char obj_name[64]; data/iproute2-5.9.0/include/bpf_scm.h:32:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg_buf[BPF_SCM_MSG_SIZE]; data/iproute2-5.9.0/include/libgenl.h:11:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_ALIGN(_hdrsiz) + (_bufsiz)]; \ data/iproute2-5.9.0/include/libiptc/xtcshared.h:5:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef char xt_chainlabel[32]; data/iproute2-5.9.0/include/libnetlink.h:210:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&tmp, RTA_DATA(rta), sizeof(__u64)); data/iproute2-5.9.0/include/uapi/linux/atm.h:209:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char prv[ATM_ESA_LEN];/* private ATM address */ data/iproute2-5.9.0/include/uapi/linux/atm.h:210:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pub[ATM_E164_LEN+1]; /* public address (E.164) */ data/iproute2-5.9.0/include/uapi/linux/atmapi.h:28:27: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. typedef struct { unsigned char _[8]; } __ATM_API_ALIGN atm_kptr_t; data/iproute2-5.9.0/include/uapi/linux/atmsap.h:133:15: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char snap[5];/* IEEE 802.1 SNAP identifier */ data/iproute2-5.9.0/include/uapi/linux/atmsap.h:144:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hl_info[ATM_MAX_HLI];/* high layer information */ data/iproute2-5.9.0/include/uapi/linux/bpf.h:435:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char build_id[BPF_BUILD_ID_SIZE]; data/iproute2-5.9.0/include/uapi/linux/bpf.h:457:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char map_name[BPF_OBJ_NAME_LEN]; data/iproute2-5.9.0/include/uapi/linux/bpf.h:505:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char prog_name[BPF_OBJ_NAME_LEN]; data/iproute2-5.9.0/include/uapi/linux/bpf.h:4009:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[BPF_OBJ_NAME_LEN]; data/iproute2-5.9.0/include/uapi/linux/bpf.h:4042:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[BPF_OBJ_NAME_LEN]; data/iproute2-5.9.0/include/uapi/linux/can/netlink.h:48:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[16]; /* Name of the CAN controller hardware */ data/iproute2-5.9.0/include/uapi/linux/hdlc/ioctl.h:74:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char master[IFNAMSIZ]; /* Name of master FRAD device */ data/iproute2-5.9.0/include/uapi/linux/if.h:236:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ifrn_name[IFNAMSIZ]; /* if name, e.g. "en0" */ data/iproute2-5.9.0/include/uapi/linux/if.h:249:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ifru_slave[IFNAMSIZ]; /* Just fits the size */ data/iproute2-5.9.0/include/uapi/linux/if.h:250:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ifru_newname[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/if_arp.h:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char arp_dev[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/if_arp.h:155:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */ data/iproute2-5.9.0/include/uapi/linux/if_arp.h:156:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ar_sip[4]; /* sender IP address */ data/iproute2-5.9.0/include/uapi/linux/if_arp.h:157:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ar_tha[ETH_ALEN]; /* target hardware address */ data/iproute2-5.9.0/include/uapi/linux/if_arp.h:158:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char ar_tip[4]; /* target IP address */ data/iproute2-5.9.0/include/uapi/linux/if_bonding.h:116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char slave_name[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/if_ether.h:165:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char h_dest[ETH_ALEN]; /* destination eth addr */ data/iproute2-5.9.0/include/uapi/linux/if_ether.h:166:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char h_source[ETH_ALEN]; /* source ether addr */ data/iproute2-5.9.0/include/uapi/linux/if_packet.h:9:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char spkt_device[14]; data/iproute2-5.9.0/include/uapi/linux/if_packet.h:20:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char sll_addr[8]; data/iproute2-5.9.0/include/uapi/linux/if_packet.h:296:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char mr_address[8]; data/iproute2-5.9.0/include/uapi/linux/if_tunnel.h:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/if_vlan.h:52:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device1[24]; data/iproute2-5.9.0/include/uapi/linux/if_vlan.h:55:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char device2[24]; data/iproute2-5.9.0/include/uapi/linux/in.h:243:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char __pad[__SOCK_SIZE__ - sizeof(short int) - data/iproute2-5.9.0/include/uapi/linux/ip6_tunnel.h:28:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IFNAMSIZ]; /* name of tunnel device */ data/iproute2-5.9.0/include/uapi/linux/ip6_tunnel.h:40:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IFNAMSIZ]; /* name of tunnel device */ data/iproute2-5.9.0/include/uapi/linux/l2tp.h:34:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char __pad[__SOCK_SIZE__ - data/iproute2-5.9.0/include/uapi/linux/netfilter/ipset/ip_set.h:284:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IPSET_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:17:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_EXTENSION_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:31:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char data[0]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:40:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_EXTENSION_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:54:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char data[0]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errorname[XT_FUNCTION_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:78:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_EXTENSION_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter/x_tables.h:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h:74:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h:75:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h:122:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char elems[0]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h:157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h:179:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv4/ip_tables.h:210:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h:67:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char iniface[IFNAMSIZ], outiface[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h:68:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iniface_mask[IFNAMSIZ], outiface_mask[IFNAMSIZ]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h:126:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char elems[0]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h:197:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/netfilter_ipv6/ip6_tables.h:250:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[XT_TABLE_MAXNAMELEN]; data/iproute2-5.9.0/include/uapi/linux/socket.h:21:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char __data[_K_SS_MAXSIZE - sizeof(unsigned short)]; data/iproute2-5.9.0/include/uapi/linux/sysinfo.h:22:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char _f[20-2*sizeof(__kernel_ulong_t)-sizeof(__u32)]; /* Padding: libc5 uses this.. */ data/iproute2-5.9.0/include/uapi/linux/tipc.h:121:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char usr_handle[8]; /* available for subscriber use */ data/iproute2-5.9.0/include/uapi/linux/tipc.h:228:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linkname[TIPC_MAX_LINK_NAME]; data/iproute2-5.9.0/include/uapi/linux/tipc.h:233:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char node_id[TIPC_NODEID_LEN]; data/iproute2-5.9.0/include/uapi/linux/tipc.h:242:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_name[TIPC_AEAD_ALG_NAME]; data/iproute2-5.9.0/include/uapi/linux/tls.h:90:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[TLS_CIPHER_AES_GCM_128_IV_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:91:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char key[TLS_CIPHER_AES_GCM_128_KEY_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:92:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char salt[TLS_CIPHER_AES_GCM_128_SALT_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:93:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rec_seq[TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:98:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[TLS_CIPHER_AES_GCM_256_IV_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:99:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char key[TLS_CIPHER_AES_GCM_256_KEY_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:100:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char salt[TLS_CIPHER_AES_GCM_256_SALT_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:101:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rec_seq[TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:106:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char iv[TLS_CIPHER_AES_CCM_128_IV_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:107:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char key[TLS_CIPHER_AES_CCM_128_KEY_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:108:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char salt[TLS_CIPHER_AES_CCM_128_SALT_SIZE]; data/iproute2-5.9.0/include/uapi/linux/tls.h:109:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char rec_seq[TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:36:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ctx_str[0]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:103:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_name[64]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:105:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_key[0]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:109:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_name[64]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_key[0]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_name[64]; data/iproute2-5.9.0/include/uapi/linux/xfrm.h:119:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char alg_key[0]; data/iproute2-5.9.0/include/utils.h:45:23: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. #define SPRINT_BUF(x) char x[SPRINT_BSIZE] data/iproute2-5.9.0/include/utils.h:117:18: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char a_addr[DN_MAXADDL]; data/iproute2-5.9.0/ip/ip.c:164:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *largv[100]; data/iproute2-5.9.0/ip/ip.c:229:22: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). max_flush_loops = atoi(argv[1]); data/iproute2-5.9.0/ip/ip_common.h:108:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipaddress.c:237:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char slave[32]; data/iproute2-5.9.0/ip/ipaddress.c:558:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/ip/ipaddress.c:1409:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fn, n, n->nlmsg_len); data/iproute2-5.9.0/ip/ipaddress.c:1592:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&h->h, n, n->nlmsg_len); data/iproute2-5.9.0/ip/ipaddress.c:1789:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flushb[4096-512]; data/iproute2-5.9.0/ip/ipaddress.c:2239:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/ip/ipaddrlabel.c:143:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipila.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[256]; data/iproute2-5.9.0/ip/ipl2tp.c:197:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[32]; data/iproute2-5.9.0/ip/ipl2tp.c:215:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/ip/ipl2tp.c:374:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->cookie, RTA_DATA(attrs[L2TP_ATTR_COOKIE]), data/iproute2-5.9.0/ip/ipl2tp.c:378:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->peer_cookie, RTA_DATA(attrs[L2TP_ATTR_PEER_COOKIE]), data/iproute2-5.9.0/ip/iplink.c:152:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/ip/iplink.c:224:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/iplink.c:326:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[64 + sizeof(b1) + sizeof(b2)]; data/iproute2-5.9.0/ip/iplink.c:586:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[32]; data/iproute2-5.9.0/ip/iplink.c:620:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). index = atoi(*argv); data/iproute2-5.9.0/ip/iplink_bond.c:348:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[32]; data/iproute2-5.9.0/ip/iplink_bridge.c:77:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char eaddr[32]; data/iproute2-5.9.0/ip/iplink_bridge.c:152:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char llabuf[32]; data/iproute2-5.9.0/ip/iplink_bridge.c:463:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bridge_id[32]; data/iproute2-5.9.0/ip/iplink_bridge.c:474:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char root_id[32]; data/iproute2-5.9.0/ip/iplink_bridge_slave.c:62:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *fwd_mask_tbl[16] = { data/iproute2-5.9.0/ip/iplink_bridge_slave.c:192:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bridge_id[32]; data/iproute2-5.9.0/ip/iplink_bridge_slave.c:203:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char root_id[32]; data/iproute2-5.9.0/ip/iplink_bridge_slave.c:270:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char convbuf[256]; data/iproute2-5.9.0/ip/iplink_can.c:254:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *can_state_names[CAN_STATE_MAX] = { data/iproute2-5.9.0/ip/iplink_geneve.c:276:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr, RTA_DATA(tb[IFLA_GENEVE_REMOTE6]), sizeof(struct in6_addr)); data/iproute2-5.9.0/ip/iplink_macvlan.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mac[ETH_ALEN]; data/iproute2-5.9.0/ip/iplink_vrf.c:111:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/iplink_vrf.c:179:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/iplink_vxlan.c:450:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr, RTA_DATA(tb[IFLA_VXLAN_GROUP6]), sizeof(struct in6_addr)); data/iproute2-5.9.0/ip/iplink_vxlan.c:480:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&addr, RTA_DATA(tb[IFLA_VXLAN_LOCAL6]), sizeof(struct in6_addr)); data/iproute2-5.9.0/ip/ipmacsec.c:43:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[6]; data/iproute2-5.9.0/ip/ipmacsec.c:245:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&sci, addr, ETH_ALEN); data/iproute2-5.9.0/ip/ipmacsec.c:246:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(((char *)&sci) + ETH_ALEN, &port, sizeof(port)); data/iproute2-5.9.0/ip/ipmacsec.c:789:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *txsc_stats_names[NUM_MACSEC_TXSC_STATS_ATTR] = { data/iproute2-5.9.0/ip/ipmacsec.c:809:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *secy_stats_names[NUM_MACSEC_SECY_STATS_ATTR] = { data/iproute2-5.9.0/ip/ipmacsec.c:833:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *rxsa_stats_names[NUM_MACSEC_SA_STATS_ATTR] = { data/iproute2-5.9.0/ip/ipmacsec.c:853:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *txsa_stats_names[NUM_MACSEC_SA_STATS_ATTR] = { data/iproute2-5.9.0/ip/ipmacsec.c:914:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *rxsc_stats_names[NUM_MACSEC_RXSC_STATS_ATTR] = { data/iproute2-5.9.0/ip/ipmacsec.c:1190:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b2[4]; data/iproute2-5.9.0/ip/ipmacsec.c:1194:44: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). print_uint(PRINT_JSON, "icv_len", NULL, atoi(b2)); data/iproute2-5.9.0/ip/ipmacsec.c:1203:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b2[4]; data/iproute2-5.9.0/ip/ipmacsec.c:1207:48: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). print_uint(PRINT_JSON, "encoding_sa", NULL, atoi(b2)); data/iproute2-5.9.0/ip/ipmaddr.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IFNAMSIZ]; data/iproute2-5.9.0/ip/ipmaddr.c:89:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/ip/ipmaddr.c:90:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen("/proc/net/dev_mcast", "r"); data/iproute2-5.9.0/ip/ipmaddr.c:96:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hexa[256]; data/iproute2-5.9.0/ip/ipmaddr.c:110:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ma, &m, sizeof(m)); data/iproute2-5.9.0/ip/ipmaddr.c:128:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/ip/ipmaddr.c:129:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen("/proc/net/igmp", "r"); data/iproute2-5.9.0/ip/ipmaddr.c:157:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ma, &m, sizeof(m)); data/iproute2-5.9.0/ip/ipmaddr.c:166:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/ip/ipmaddr.c:167:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen("/proc/net/igmp6", "r"); data/iproute2-5.9.0/ip/ipmaddr.c:173:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hexa[256]; data/iproute2-5.9.0/ip/ipmaddr.c:186:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ma, &m, sizeof(m)); data/iproute2-5.9.0/ip/ipmonitor.c:326:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/ip/ipmroute.c:130:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char obuf[256]; data/iproute2-5.9.0/ip/ipneigh.c:110:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/ip/ipneigh.c:188:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char llabuf[20]; data/iproute2-5.9.0/ip/ipneigh.c:324:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fn, n, n->nlmsg_len); data/iproute2-5.9.0/ip/ipneigh.c:547:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flushb[4096-512]; data/iproute2-5.9.0/ip/ipneigh.c:608:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnetconf.c:172:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnetns.c:69:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnetns.c:79:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/proc/self/ns/net", O_RDONLY); data/iproute2-5.9.0/ip/ipnetns.c:110:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnetns.c:159:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[0]; data/iproute2-5.9.0/ip/ipnetns.c:314:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[NAME_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:379:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnetns.c:580:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char net_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:597:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). netns = open(net_path, O_RDONLY); data/iproute2-5.9.0/ip/ipnetns.c:615:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pid_net_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:636:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char net_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:645:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). netns = open(net_path, O_RDONLY); data/iproute2-5.9.0/ip/ipnetns.c:668:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:695:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[256]; data/iproute2-5.9.0/ip/ipnetns.c:721:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char netns_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:766:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). saved_netns = open("/proc/self/ns/net", O_RDONLY | O_CLOEXEC); data/iproute2-5.9.0/ip/ipnetns.c:800:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char netns_path[PATH_MAX], proc_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:853:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(netns_path, O_RDONLY|O_CREAT|O_EXCL, 0); data/iproute2-5.9.0/ip/ipnetns.c:869:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(proc_path, "/proc/self/ns/net"); data/iproute2-5.9.0/ip/ipnetns.c:899:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnetns.c:925:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char netns_path[PATH_MAX]; data/iproute2-5.9.0/ip/ipnetns.c:947:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). netns = open(netns_path, O_RDONLY | O_CLOEXEC); data/iproute2-5.9.0/ip/ipnetns.c:959:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/ip/ipnexthop.c:90:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/ip/ipnexthop.c:336:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnexthop.c:381:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipnexthop.c:435:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipntable.c:69:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipntable.c:79:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char parms_buf[1024] = {}; data/iproute2-5.9.0/ip/ipntable.c:314:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[32]; data/iproute2-5.9.0/ip/ipntable.c:336:2: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "(error)"); data/iproute2-5.9.0/ip/iproute.c:41:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *mx_names[RTAX_MAX+1] = { data/iproute2-5.9.0/ip/iproute.c:245:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dst.data, RTA_DATA(tb[RTA_DST]), (r->rtm_dst_len+7)/8); data/iproute2-5.9.0/ip/iproute.c:250:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&src.data, RTA_DATA(tb[RTA_SRC]), (r->rtm_src_len+7)/8); data/iproute2-5.9.0/ip/iproute.c:254:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&via.data, RTA_DATA(tb[RTA_GATEWAY]), host_len/8); data/iproute2-5.9.0/ip/iproute.c:260:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&via.data, rtvia->rtvia_addr, len); data/iproute2-5.9.0/ip/iproute.c:265:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&prefsrc.data, RTA_DATA(tb[RTA_PREFSRC]), host_len/8); data/iproute2-5.9.0/ip/iproute.c:766:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fn, n, n->nlmsg_len); data/iproute2-5.9.0/ip/iproute.c:1050:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/ip/iproute.c:1088:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/ip/iproute.c:1097:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mxbuf[256]; data/iproute2-5.9.0/ip/iproute.c:1444:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/iproute.c:1573:17: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int flush_fd = open(ROUTE_FLUSH_PATH, O_WRONLY); data/iproute2-5.9.0/ip/iproute.c:1664:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flushb[4096-512]; data/iproute2-5.9.0/ip/iproute.c:1951:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/iproute_lwtunnel.c:207:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *seg6_action_names[SEG6_LOCAL_ACTION_MAX + 1] = { data/iproute2-5.9.0/ip/iproute_lwtunnel.c:346:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[rem * 2 + 1]; data/iproute2-5.9.0/ip/iproute_lwtunnel.c:493:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[ADDR64_BUF_SIZE]; data/iproute2-5.9.0/ip/iproute_lwtunnel.c:654:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&srh->segments[i], addr.data, sizeof(struct in6_addr)); data/iproute2-5.9.0/ip/iproute_lwtunnel.c:677:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segbuf[1024] = ""; data/iproute2-5.9.0/ip/iproute_lwtunnel.c:720:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(tuninfo->srh, srh, srhlen); data/iproute2-5.9.0/ip/iproute_lwtunnel.c:762:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&srh->rpl_segaddr[i], addr.data, sizeof(struct in6_addr)); data/iproute2-5.9.0/ip/iproute_lwtunnel.c:774:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segbuf[1024] = ""; data/iproute2-5.9.0/ip/iproute_lwtunnel.c:869:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char segbuf[1024]; data/iproute2-5.9.0/ip/iprule.c:75:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char iif[IFNAMSIZ]; data/iproute2-5.9.0/ip/iprule.c:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char oif[IFNAMSIZ]; data/iproute2-5.9.0/ip/iprule.c:780:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/ip/ipseg6.c:62:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char secret[64]; data/iproute2-5.9.0/ip/ipseg6.c:74:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(secret, RTA_DATA(attrs[SEG6_ATTR_SECRET]), slen); data/iproute2-5.9.0/ip/iptoken.c:133:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/iproute2-5.9.0/ip/iptunnel.c:496:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ip6rd.prefix, prefix.data, 16); data/iproute2-5.9.0/ip/iptunnel.c:503:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ip6rd.relay_prefix, prefix.data, 4); data/iproute2-5.9.0/ip/iptuntap.c:62:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(TUNDEV, O_RDWR); data/iproute2-5.9.0/ip/iptuntap.c:91:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). int fd = open(TUNDEV, O_RDWR); data/iproute2-5.9.0/ip/iptuntap.c:273:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(comm, "r"); data/iproute2-5.9.0/ip/iptuntap.c:309:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char linkbuf[linkbuf_len], *fdinfo; data/iproute2-5.9.0/ip/iptuntap.c:331:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(fdinfo, "r"); data/iproute2-5.9.0/ip/ipvrf.c:54:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/ip/ipvrf.c:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/ip/ipvrf.c:60:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(path, "r"); data/iproute2-5.9.0/ip/ipvrf.c:90:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vrf[32]; data/iproute2-5.9.0/ip/ipvrf.c:116:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/ip/ipvrf.c:117:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/ip/ipvrf.c:124:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(path, "r"); data/iproute2-5.9.0/ip/ipvrf.c:130:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *nl, comm[32]; data/iproute2-5.9.0/ip/ipvrf.c:137:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(comm, "<terminated?>"); data/iproute2-5.9.0/ip/ipvrf.c:148:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/ip/ipvrf.c:206:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(netns, "-ns"); data/iproute2-5.9.0/ip/ipvrf.c:214:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char netns[256]; data/iproute2-5.9.0/ip/ipvrf.c:244:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char bpf_log_buf[256*1024]; data/iproute2-5.9.0/ip/ipvrf.c:267:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). cg_fd = open(path, O_DIRECTORY | O_RDONLY); data/iproute2-5.9.0/ip/ipvrf.c:310:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/ip/ipvrf.c:311:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/ip/ipvrf.c:316:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(path, "r"); data/iproute2-5.9.0/ip/ipvrf.c:356:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX], *mnt, pid[16]; data/iproute2-5.9.0/ip/ipvrf.c:357:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vpath[PATH_MAX], netns[256]; data/iproute2-5.9.0/ip/ipvrf.c:421:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path, O_RDWR | O_APPEND); data/iproute2-5.9.0/ip/ipvrf.c:471:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vrf[32]; data/iproute2-5.9.0/ip/ipxfrm.c:130:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[16]; data/iproute2-5.9.0/ip/ipxfrm.c:143:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%u", proto); data/iproute2-5.9.0/ip/ipxfrm.c:173:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[32]; data/iproute2-5.9.0/ip/ipxfrm.c:186:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%d", type); data/iproute2-5.9.0/ip/ipxfrm.c:192:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[16]; data/iproute2-5.9.0/ip/ipxfrm.c:206:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[16]; data/iproute2-5.9.0/ip/ipxfrm.c:208:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%.8x", mask); data/iproute2-5.9.0/ip/ipxfrm.c:215:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[32]; data/iproute2-5.9.0/ip/ipxfrm.c:219:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "any"); data/iproute2-5.9.0/ip/ipxfrm.c:222:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "session"); data/iproute2-5.9.0/ip/ipxfrm.c:225:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "user"); data/iproute2-5.9.0/ip/ipxfrm.c:228:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "unique"); data/iproute2-5.9.0/ip/ipxfrm.c:231:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%u", share); data/iproute2-5.9.0/ip/ipxfrm.c:240:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[32]; data/iproute2-5.9.0/ip/ipxfrm.c:248:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u", proto); data/iproute2-5.9.0/ip/ipxfrm.c:257:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[16]; data/iproute2-5.9.0/ip/ipxfrm.c:261:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "main"); data/iproute2-5.9.0/ip/ipxfrm.c:264:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "sub"); data/iproute2-5.9.0/ip/ipxfrm.c:267:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%u", ptype); data/iproute2-5.9.0/ip/ipxfrm.c:331:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[32]; data/iproute2-5.9.0/ip/ipxfrm.c:334:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "(INF)"); data/iproute2-5.9.0/ip/ipxfrm.c:336:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(str, "%llu", (unsigned long long) limit); data/iproute2-5.9.0/ip/ipxfrm.c:356:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char str[32]; data/iproute2-5.9.0/ip/ipxfrm.c:555:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(base_algo->alg_key, algo->alg_key, algo->alg_key_len / 8); data/iproute2-5.9.0/ip/ipxfrm.c:572:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(base_algo->alg_key, algo->alg_key, algo->alg_key_len / 8); data/iproute2-5.9.0/ip/ipxfrm.c:919:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[STRBUF_SIZE] = {}; data/iproute2-5.9.0/ip/ipxfrm.c:969:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sbuf[STRBUF_SIZE]; data/iproute2-5.9.0/ip/ipxfrm.c:1001:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[STRBUF_SIZE] = {}; data/iproute2-5.9.0/ip/ipxfrm.c:1115:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(saddr, &src.data, sizeof(*saddr)); data/iproute2-5.9.0/ip/link_gre.c:434:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[64]; data/iproute2-5.9.0/ip/link_gre6.c:452:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[64]; data/iproute2-5.9.0/ip/link_ip6tnl.c:337:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[64]; data/iproute2-5.9.0/ip/link_iptnl.c:361:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[64]; data/iproute2-5.9.0/ip/link_vti.c:167:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[64]; data/iproute2-5.9.0/ip/link_vti6.c:169:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char s2[64]; data/iproute2-5.9.0/ip/rtmon.c:31:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/ip/rtmon.c:157:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "w"); data/iproute2-5.9.0/ip/tcp_metrics.c:64:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *metric_name[TCP_METRIC_MAX + 1] = { data/iproute2-5.9.0/ip/tcp_metrics.c:250:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fn, &req2.n, req2.n.nlmsg_len); data/iproute2-5.9.0/ip/tcp_metrics.c:280:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tw_ts[64]; data/iproute2-5.9.0/ip/tcp_metrics.c:316:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cookie[32 + 1]; data/iproute2-5.9.0/ip/tcp_metrics.c:324:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(cookie + i + i, "%02x", ptr[i]); data/iproute2-5.9.0/ip/tcp_metrics.c:460:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char flushb[4096-512]; data/iproute2-5.9.0/ip/tunnel.c:200:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[32]; data/iproute2-5.9.0/ip/tunnel.c:201:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b1[16]; data/iproute2-5.9.0/ip/xfrm_monitor.c:407:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/ip/xfrm_policy.c:234:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctxstr, s, slen); data/iproute2-5.9.0/ip/xfrm_policy.c:245:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:261:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpls_buf[XFRM_TMPLS_BUF_SIZE] = {}; data/iproute2-5.9.0/ip/xfrm_policy.c:266:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[CTX_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:568:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:584:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[CTX_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:867:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_DELETEALL_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:877:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:919:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:1039:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_policy.c:1132:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:152:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char vbuf[3]; data/iproute2-5.9.0/ip/xfrm_state.c:170:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, key, len); data/iproute2-5.9.0/ip/xfrm_state.c:299:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:329:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[CTX_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:413:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&xcoa, &coa.data, coa.bytelen); data/iproute2-5.9.0/ip/xfrm_state.c:476:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[XFRM_ALGO_KEY_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:767:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:1032:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[RTA_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:1227:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_DELETEALL_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:1237:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_BUF_SIZE]; data/iproute2-5.9.0/ip/xfrm_state.c:1287:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NLMSG_BUF_SIZE]; data/iproute2-5.9.0/lib/bpf.c:238:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(arg, "r"); data/iproute2-5.9.0/lib/bpf.c:409:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[PATH_MAX], buff[4096]; data/iproute2-5.9.0/lib/bpf.c:415:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/lib/bpf.c:560:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char type[100]; data/iproute2-5.9.0/lib/bpf.c:575:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/proc/mounts", "r"); data/iproute2-5.9.0/lib/bpf.c:594:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tracefs_mnt[PATH_MAX] = TRACE_DIR_MNT; data/iproute2-5.9.0/lib/bpf.c:603:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tpipe[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:615:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd_in = open(tpipe, O_RDONLY); data/iproute2-5.9.0/lib/bpf.c:621:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buff[4096]; data/iproute2-5.9.0/lib/bpf.c:636:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bpf_glo_dir[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:654:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bpf_sub_dir[PATH_MAX + NAME_MAX + 1]; data/iproute2-5.9.0/lib/bpf.c:695:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bpf_lnk_dir[PATH_MAX + NAME_MAX + 1]; data/iproute2-5.9.0/lib/bpf.c:696:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bpf_sub_dir[PATH_MAX + NAME_MAX]; data/iproute2-5.9.0/lib/bpf.c:744:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char bpf_tmp[PATH_MAX] = BPF_DIR_MNT; data/iproute2-5.9.0/lib/bpf.c:745:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char bpf_wrk_dir[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:805:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:954:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char annotation[256]; data/iproute2-5.9.0/lib/bpf.c:1154:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char obj_uid[64]; data/iproute2-5.9.0/lib/bpf.c:1169:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char license[ELF_MAX_LICENSE_LEN]; data/iproute2-5.9.0/lib/bpf.c:1329:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ffd = open(object, O_RDONLY); data/iproute2-5.9.0/lib/bpf.c:1434:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:1445:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:1463:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[PATH_MAX], rem[PATH_MAX], *sub; data/iproute2-5.9.0/lib/bpf.c:1493:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathname[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:1726:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char btf_name[512]; data/iproute2-5.9.0/lib/bpf.c:1916:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&data->sec_hdr, &sec_hdr, sizeof(sec_hdr)); data/iproute2-5.9.0/lib/bpf.c:1942:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->maps, data->sec_data->d_buf, ctx->map_num); data/iproute2-5.9.0/lib/bpf.c:2018:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fixup[i], buff, ctx->map_len); data/iproute2-5.9.0/lib/bpf.c:2021:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->maps, fixup, sizeof(fixup)); data/iproute2-5.9.0/lib/bpf.c:2034:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(ctx->license, data->sec_data->d_buf, data->sec_data->d_size); data/iproute2-5.9.0/lib/bpf.c:2433:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(insns + prog->insns_num, prog_text->insns, data/iproute2-5.9.0/lib/bpf.c:2512:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(prog->insns, data_insn.sec_data->d_buf, prog->size); data/iproute2-5.9.0/lib/bpf.c:2594:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char file[PATH_MAX], buff[4096]; data/iproute2-5.9.0/lib/bpf.c:2601:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/lib/bpf.c:2712:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buff[PATH_MAX]; data/iproute2-5.9.0/lib/bpf.c:2750:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char subpath[PATH_MAX] = {}; data/iproute2-5.9.0/lib/bpf.c:2755:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(db_file, "r"); data/iproute2-5.9.0/lib/bpf.c:2846:7: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(path_jit, O_RDONLY); data/iproute2-5.9.0/lib/bpf.c:2848:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[16] = {}; data/iproute2-5.9.0/lib/bpf.c:2851:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). ctx->cfg.jit_enabled = atoi(tmp); data/iproute2-5.9.0/lib/bpf.c:2882:16: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). ctx->obj_fd = open(pathname, O_RDONLY); data/iproute2-5.9.0/lib/bpf.c:3039:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cmsg_buf, &aux->fds[i], sizeof(aux->fds[0]) * min_fd); data/iproute2-5.9.0/lib/bpf.c:3040:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(amsg_buf, &aux->ent[i], sizeof(aux->ent[0]) * min_fd); data/iproute2-5.9.0/lib/bpf.c:3087:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&fds[i], cmsg_buf, sizeof(fds[0]) * min_fd); data/iproute2-5.9.0/lib/bpf.c:3088:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&aux->ent[i], amsg_buf, sizeof(aux->ent[0]) * min_fd); data/iproute2-5.9.0/lib/bpf.c:3089:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(aux, mmsg_buf, offsetof(struct bpf_map_aux, ent)); data/iproute2-5.9.0/lib/cg_map.c:110:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[64]; data/iproute2-5.9.0/lib/fs.c:36:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[4096]; data/iproute2-5.9.0/lib/fs.c:37:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fstype[128]; /* max length of any filesystem name */ data/iproute2-5.9.0/lib/fs.c:41:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/proc/mounts", "r"); data/iproute2-5.9.0/lib/fs.c:109:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fh_buf[sizeof(struct file_handle) + sizeof(__u64)] = { 0 }; data/iproute2-5.9.0/lib/fs.c:113:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bytes[sizeof(__u64)]; data/iproute2-5.9.0/lib/fs.c:139:12: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). mnt_fd = open(mnt, O_RDONLY); data/iproute2-5.9.0/lib/fs.c:157:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cg_id.bytes, fhp->f_handle, sizeof(__u64)); data/iproute2-5.9.0/lib/fs.c:171:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fh_buf[sizeof(struct file_handle) + sizeof(__u64)] = { 0 }; data/iproute2-5.9.0/lib/fs.c:175:12: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char bytes[sizeof(__u64)]; data/iproute2-5.9.0/lib/fs.c:178:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char link_buf[PATH_MAX]; data/iproute2-5.9.0/lib/fs.c:180:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fd_path[64]; data/iproute2-5.9.0/lib/fs.c:193:11: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). mnt_fd = open(mnt, O_RDONLY); data/iproute2-5.9.0/lib/fs.c:201:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(fhp->f_handle, cg_id.bytes, sizeof(__u64)); data/iproute2-5.9.0/lib/fs.c:279:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/lib/fs.c:280:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[128]; data/iproute2-5.9.0/lib/fs.c:288:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(path, "r"); data/iproute2-5.9.0/lib/libnetlink.c:262:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/lib/libnetlink.c:288:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/lib/libnetlink.c:330:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/lib/libnetlink.c:372:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/lib/libnetlink.c:429:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[0] __aligned(NLMSG_ALIGNTO); data/iproute2-5.9.0/lib/libnetlink.c:447:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/lib/libnetlink.c:525:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/lib/libnetlink.c:554:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/lib/libnetlink.c:599:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char resp[1024]; data/iproute2-5.9.0/lib/libnetlink.c:1090:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16384]; data/iproute2-5.9.0/lib/libnetlink.c:1091:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cmsgbuf[BUFSIZ]; data/iproute2-5.9.0/lib/libnetlink.c:1178:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16384]; data/iproute2-5.9.0/lib/libnetlink.c:1268:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(RTA_DATA(rta), data, alen); data/iproute2-5.9.0/lib/libnetlink.c:1282:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(NLMSG_TAIL(n), data, len); data/iproute2-5.9.0/lib/libnetlink.c:1335:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(RTA_DATA(subrta), &data, 4); data/iproute2-5.9.0/lib/libnetlink.c:1356:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(RTA_DATA(subrta), data, alen); data/iproute2-5.9.0/lib/ll_addr.c:60:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(lladdr, pfx.data, 4); data/iproute2-5.9.0/lib/ll_map.c:254:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[IFNAMSIZ]; data/iproute2-5.9.0/lib/ll_map.c:274:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/lib/ll_map.c:314:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[IFNAMSIZ]; data/iproute2-5.9.0/lib/names.c:24:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NAME_MAX_LEN]; data/iproute2-5.9.0/lib/names.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[NAME_MAX_LEN] = {0}; data/iproute2-5.9.0/lib/names.c:75:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(path, "r"); data/iproute2-5.9.0/lib/namespace.c:20:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char etc_netns_path[sizeof(NETNS_ETC_DIR) + NAME_MAX]; data/iproute2-5.9.0/lib/namespace.c:21:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char netns_name[PATH_MAX]; data/iproute2-5.9.0/lib/namespace.c:22:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char etc_name[PATH_MAX]; data/iproute2-5.9.0/lib/namespace.c:51:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char net_path[PATH_MAX]; data/iproute2-5.9.0/lib/namespace.c:57:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). netns = open(net_path, O_RDONLY | O_CLOEXEC); data/iproute2-5.9.0/lib/namespace.c:106:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char pathbuf[PATH_MAX]; data/iproute2-5.9.0/lib/namespace.c:116:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(path, O_RDONLY); data/iproute2-5.9.0/lib/rt_names.c:40:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[NAME_MAX_LEN]; data/iproute2-5.9.0/lib/rt_names.c:69:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[NAME_MAX_LEN] = {0}; data/iproute2-5.9.0/lib/rt_names.c:72:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/lib/rt_names.c:100:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[NAME_MAX_LEN] = {0}; data/iproute2-5.9.0/lib/rt_names.c:103:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(file, "r"); data/iproute2-5.9.0/lib/rt_names.c:122:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *rtnl_rtprot_tab[256] = { data/iproute2-5.9.0/lib/rt_names.c:164:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/lib/rt_names.c:233:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *rtnl_rtscope_tab[256] = { data/iproute2-5.9.0/lib/rt_names.c:302:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *rtnl_rtrealm_tab[256] = { data/iproute2-5.9.0/lib/rt_names.c:396:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX]; data/iproute2-5.9.0/lib/rt_names.c:467:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *rtnl_rtdsfield_tab[256] = { data/iproute2-5.9.0/lib/rt_names.c:604:8: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *nl_proto_tab[256] = { data/iproute2-5.9.0/lib/utils.c:54:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char fname[128], buf[80], *endp, *nl; data/iproute2-5.9.0/lib/utils.c:67:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, "r"); data/iproute2-5.9.0/lib/utils.c:725:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->data, data, 4); data/iproute2-5.9.0/lib/utils.c:730:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->data, data, 16); data/iproute2-5.9.0/lib/utils.c:735:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->data, data, 2); data/iproute2-5.9.0/lib/utils.c:740:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->data, data, 10); data/iproute2-5.9.0/lib/utils.c:942:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/iproute2-5.9.0/lib/utils.c:947:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(getenv("HZ")) ? : HZ; data/iproute2-5.9.0/lib/utils.c:956:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(name, "/proc/net/psched"); data/iproute2-5.9.0/lib/utils.c:958:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(name, "r"); data/iproute2-5.9.0/lib/utils.c:1017:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[256]; data/iproute2-5.9.0/lib/utils.c:1097:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(n->addr.data, addr, len); data/iproute2-5.9.0/lib/utils.c:1132:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[256]; data/iproute2-5.9.0/lib/utils.c:1146:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(ptr, "%02x", str[i]); data/iproute2-5.9.0/lib/utils.c:1162:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmpstr[3]; data/iproute2-5.9.0/lib/utils.c:1249:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tshort[40]; data/iproute2-5.9.0/lib/utils.c:1421:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d", val); data/iproute2-5.9.0/lib/utils.c:1539:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s, RTA_DATA(rta), len); data/iproute2-5.9.0/lib/utils.c:1554:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, minlen); data/iproute2-5.9.0/misc/arpd.c:123:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/misc/arpd.c:128:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(buf, "w")) != NULL) { data/iproute2-5.9.0/misc/arpd.c:130:6: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "0\n"); data/iproute2-5.9.0/misc/arpd.c:132:6: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d\n", active_probing >= 2 ? 1 : 3-active_probing); data/iproute2-5.9.0/misc/arpd.c:139:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(buf, "w")) != NULL) { data/iproute2-5.9.0/misc/arpd.c:140:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%d\n", active_probing <= 1 ? 1 : active_probing); data/iproute2-5.9.0/misc/arpd.c:156:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/misc/arpd.c:161:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(buf, "w")) != NULL) { data/iproute2-5.9.0/misc/arpd.c:162:5: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "3\n"); data/iproute2-5.9.0/misc/arpd.c:168:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(buf, "w")) != NULL) { data/iproute2-5.9.0/misc/arpd.c:169:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "0\n"); data/iproute2-5.9.0/misc/arpd.c:187:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[256]; data/iproute2-5.9.0/misc/arpd.c:217:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, ifr.ifr_hwaddr.sa_data, ah->ar_hln); data/iproute2-5.9.0/misc/arpd.c:220:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &dst.sin_addr, 4); data/iproute2-5.9.0/misc/arpd.c:224:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &sll.sll_addr, ah->ar_hln); data/iproute2-5.9.0/misc/arpd.c:227:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p, &addr, 4); data/iproute2-5.9.0/misc/arpd.c:268:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/misc/arpd.c:334:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&key.addr, RTA_DATA(tb[NDA_DST]), 4); data/iproute2-5.9.0/misc/arpd.c:440:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[8192]; data/iproute2-5.9.0/misc/arpd.c:480:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char buf[1024]; data/iproute2-5.9.0/misc/arpd.c:511:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&key.addr, (char *)(a+1) + a->ar_hln, 4); data/iproute2-5.9.0/misc/arpd.c:608:21: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). active_probing = atoi(optarg); data/iproute2-5.9.0/misc/arpd.c:611:23: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). negative_timeout = atoi(optarg); data/iproute2-5.9.0/misc/arpd.c:623:26: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((broadcast_rate = atoi(optarg)) <= 0 || data/iproute2-5.9.0/misc/arpd.c:630:27: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). if ((broadcast_burst = atoi(optarg)) <= 0 || data/iproute2-5.9.0/misc/arpd.c:682:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/misc/arpd.c:692:20: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). } else if ((fp = fopen(do_load, "r")) == NULL) { data/iproute2-5.9.0/misc/arpd.c:700:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ipbuf[128]; data/iproute2-5.9.0/misc/arpd.c:701:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char macbuf[128]; data/iproute2-5.9.0/misc/arpd.c:740:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b1[18]; data/iproute2-5.9.0/misc/ifstat.c:55:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char info_source[128]; data/iproute2-5.9.0/misc/ifstat.c:70:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *stats[MAXS] = { data/iproute2-5.9.0/misc/ifstat.c:241:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/misc/ifstat.c:368:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[64]; data/iproute2-5.9.0/misc/ifstat.c:378:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%uM", (unsigned int)(rates[i]/mega)); data/iproute2-5.9.0/misc/ifstat.c:381:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%uK", (unsigned int)(rates[i]/kilo)); data/iproute2-5.9.0/misc/ifstat.c:389:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[64]; data/iproute2-5.9.0/misc/ifstat.c:399:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%uM", (unsigned int)(vals[k]/mega)); data/iproute2-5.9.0/misc/ifstat.c:402:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%uK", (unsigned int)(vals[k]/kilo)); data/iproute2-5.9.0/misc/ifstat.c:674:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(info_source, "%d.%lu sampling_interval=%d time_const=%d", data/iproute2-5.9.0/misc/ifstat.c:817:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hist_name[128]; data/iproute2-5.9.0/misc/ifstat.c:853:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). scan_interval = atoi(optarg) * 1000; data/iproute2-5.9.0/misc/ifstat.c:860:20: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). time_constant = atoi(optarg); data/iproute2-5.9.0/misc/ifstat.c:892:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sun.sun_path+1, "ifstat%d", getuid()); data/iproute2-5.9.0/misc/ifstat.c:942:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(hist_name, O_RDWR|O_CREAT|O_NOFOLLOW, 0600); data/iproute2-5.9.0/misc/ifstat.c:967:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tfp = fopen("/proc/uptime", "r")) != NULL) { data/iproute2-5.9.0/misc/ifstat.c:987:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. || (strcpy(sun.sun_path+1, "ifstat0"), data/iproute2-5.9.0/misc/ifstat.c:1014:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(info_source, "kernel"); data/iproute2-5.9.0/misc/lnstat.c:178:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *hdr[HDR_LINES]; data/iproute2-5.9.0/misc/lnstat.c:252:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *req_files[LNSTAT_MAX_FILES]; data/iproute2-5.9.0/misc/lnstat.h:19:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[LNSTAT_MAX_FIELD_NAME_LEN+1]; data/iproute2-5.9.0/misc/lnstat.h:26:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[PATH_MAX+1]; data/iproute2-5.9.0/misc/lnstat.h:27:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char basename[NAME_MAX+1]; data/iproute2-5.9.0/misc/lnstat_util.c:41:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FGETS_BUF_SIZE]; data/iproute2-5.9.0/misc/lnstat_util.c:139:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FGETS_BUF_SIZE]; data/iproute2-5.9.0/misc/lnstat_util.c:151:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[FGETS_BUF_SIZE]; data/iproute2-5.9.0/misc/lnstat_util.c:191:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). lf->fp = fopen(lf->path, "r"); data/iproute2-5.9.0/misc/nstat.c:47:1: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char info_source[128]; data/iproute2-5.9.0/misc/nstat.c:52:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char store[128]; data/iproute2-5.9.0/misc/nstat.c:60:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(p, O_RDONLY); data/iproute2-5.9.0/misc/nstat.c:125:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/misc/nstat.c:133:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char idbuf[sizeof(buf)]; data/iproute2-5.9.0/misc/nstat.c:192:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char idbuf[4096]; data/iproute2-5.9.0/misc/nstat.c:485:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(info_source, "%d.%lu sampling_interval=%d time_const=%d", data/iproute2-5.9.0/misc/nstat.c:607:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). scan_interval = 1000*atoi(optarg); data/iproute2-5.9.0/misc/nstat.c:638:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sun.sun_path+1, "nstat%d", getuid()); data/iproute2-5.9.0/misc/nstat.c:672:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(hist_name, "/tmp/.nstat.u%d", getuid()); data/iproute2-5.9.0/misc/nstat.c:681:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(hist_name, O_RDWR|O_CREAT|O_NOFOLLOW, 0600); data/iproute2-5.9.0/misc/nstat.c:706:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tfp = fopen("/proc/uptime", "r")) != NULL) { data/iproute2-5.9.0/misc/nstat.c:726:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. || (strcpy(sun.sun_path+1, "nstat0"), data/iproute2-5.9.0/misc/nstat.c:756:4: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(info_source, "kernel"); data/iproute2-5.9.0/misc/rtacct.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char store[1024]; data/iproute2-5.9.0/misc/rtacct.c:55:9: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return open(p, O_RDONLY); data/iproute2-5.9.0/misc/rtacct.c:70:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char signature[128]; data/iproute2-5.9.0/misc/rtacct.c:105:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open("/dev/mem", O_RDONLY); data/iproute2-5.9.0/misc/rtacct.c:134:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char temp[64]; data/iproute2-5.9.0/misc/rtacct.c:137:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%uM", (unsigned int)rint(rate/(1024*1024))); data/iproute2-5.9.0/misc/rtacct.c:140:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(temp, "%uK", (unsigned int)rint(rate/1024)); data/iproute2-5.9.0/misc/rtacct.c:159:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b1[16]; data/iproute2-5.9.0/misc/rtacct.c:195:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&hist_db->val[realm*4], val, sizeof(*val)*4); data/iproute2-5.9.0/misc/rtacct.c:215:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b1[16]; data/iproute2-5.9.0/misc/rtacct.c:256:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&hist_db->val[realm*4], val, sizeof(*val)*4); data/iproute2-5.9.0/misc/rtacct.c:362:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(kern_db->signature, data/iproute2-5.9.0/misc/rtacct.c:432:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char hist_name[128]; data/iproute2-5.9.0/misc/rtacct.c:455:25: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). scan_interval = 1000*atoi(optarg); data/iproute2-5.9.0/misc/rtacct.c:503:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(sun.sun_path+1, "rtacct%d", getuid()); data/iproute2-5.9.0/misc/rtacct.c:535:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(hist_name, "/tmp/.rtacct.u%d", getuid()); data/iproute2-5.9.0/misc/rtacct.c:543:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(hist_name, O_RDWR|O_CREAT|O_NOFOLLOW, 0600); data/iproute2-5.9.0/misc/rtacct.c:580:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((tfp = fopen("/proc/uptime", "r")) != NULL) { data/iproute2-5.9.0/misc/rtacct.c:597:11: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. || (strcpy(sun.sun_path+1, "rtacct0"), data/iproute2-5.9.0/misc/rtacct.c:618:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(kern_db->signature, "kernel"); data/iproute2-5.9.0/misc/ss.c:173:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[0]; data/iproute2-5.9.0/misc/ss.c:178:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[0]; data/iproute2-5.9.0/misc/ss.c:481:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char store[128]; data/iproute2-5.9.0/misc/ss.c:489:9: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). return fopen(p, "r"); data/iproute2-5.9.0/misc/ss.c:578:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[1024]; data/iproute2-5.9.0/misc/ss.c:605:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char process[16]; data/iproute2-5.9.0/misc/ss.c:630:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char lnk[64]; data/iproute2-5.9.0/misc/ss.c:633:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[1024]; data/iproute2-5.9.0/misc/ss.c:661:15: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(tmp, "r")) != NULL) { data/iproute2-5.9.0/misc/ss.c:814:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cong_alg[16]; data/iproute2-5.9.0/misc/ss.c:1005:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(chunk->next->data, t, sizeof(t->len) + t->len); data/iproute2-5.9.0/misc/ss.c:1441:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[64]; data/iproute2-5.9.0/misc/ss.c:1461:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf+strlen(buf), "%03dms", msecs); data/iproute2-5.9.0/misc/ss.c:1476:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/misc/ss.c:1488:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char proto[128], prog[128] = "rpc."; data/iproute2-5.9.0/misc/ss.c:1568:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[128]; data/iproute2-5.9.0/misc/ss.c:1608:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%u", port); data/iproute2-5.9.0/misc/ss.c:1615:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/misc/ss.c:1851:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(cond->addr, a->addr.data, alen); data/iproute2-5.9.0/misc/ss.c:1911:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, a1, l1); data/iproute2-5.9.0/misc/ss.c:1912:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a+l1, a2, l2); data/iproute2-5.9.0/misc/ss.c:1931:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, a1, l1); data/iproute2-5.9.0/misc/ss.c:1932:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a+l1+4, a2, l2); data/iproute2-5.9.0/misc/ss.c:1949:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a, a1, l1); data/iproute2-5.9.0/misc/ss.c:2021:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(b->addr.data, *ptr, len); data/iproute2-5.9.0/misc/ss.c:2110:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a->data, &cid, sizeof(cid)); data/iproute2-5.9.0/misc/ss.c:2129:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(a.addr.data, &p, sizeof(p)); data/iproute2-5.9.0/misc/ss.c:2308:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(res, &a, sizeof(a)); data/iproute2-5.9.0/misc/ss.c:2327:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(res, &a, sizeof(a)); data/iproute2-5.9.0/misc/ss.c:2433:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%.0f", bw); data/iproute2-5.9.0/misc/ss.c:2435:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%.3gT", bw / 1e12); data/iproute2-5.9.0/misc/ss.c:2437:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%.3gG", bw / 1e9); data/iproute2-5.9.0/misc/ss.c:2439:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%.3gM", bw / 1e6); data/iproute2-5.9.0/misc/ss.c:2441:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%.3gk", bw / 1e3); data/iproute2-5.9.0/misc/ss.c:2443:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(buf, "%g", bw); data/iproute2-5.9.0/misc/ss.c:2500:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b1[64]; data/iproute2-5.9.0/misc/ss.c:2686:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char opt[256]; data/iproute2-5.9.0/misc/ss.c:2750:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char line[256]; data/iproute2-5.9.0/misc/ss.c:2897:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char caps[32 + 1] = { 0 }, *cap = &caps[0]; data/iproute2-5.9.0/misc/ss.c:2964:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(info, RTA_DATA(tb[INET_DIAG_INFO]), len); data/iproute2-5.9.0/misc/ss.c:3049:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s.bbr_info, bbr_info, len); data/iproute2-5.9.0/misc/ss.c:3172:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(info, RTA_DATA(tb[INET_DIAG_INFO]), len); data/iproute2-5.9.0/misc/ss.c:3230:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(info, RTA_DATA(tb[INET_DIAG_INFO]), len); data/iproute2-5.9.0/misc/ss.c:3274:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s->local.data, r->id.idiag_src, s->local.bytelen); data/iproute2-5.9.0/misc/ss.c:3275:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(s->remote.data, r->id.idiag_dst, s->local.bytelen); data/iproute2-5.9.0/misc/ss.c:3616:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16384]; data/iproute2-5.9.0/misc/ss.c:3619:12: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(getenv("TCPDIAG_FILE"), "r")) == NULL) { data/iproute2-5.9.0/misc/ss.c:3787:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char opt[256]; data/iproute2-5.9.0/misc/ss.c:3925:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char port_name[30] = {}; data/iproute2-5.9.0/misc/ss.c:3942:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/iproute2-5.9.0/misc/ss.c:3965:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(name, RTA_DATA(tb[UNIX_DIAG_NAME]), len); data/iproute2-5.9.0/misc/ss.c:3974:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(stat.local.data, &stat.name, sizeof(stat.name)); data/iproute2-5.9.0/misc/ss.c:4055:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/misc/ss.c:4056:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/iproute2-5.9.0/misc/ss.c:4143:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(st.local.data, &u->name, sizeof(u->name)); data/iproute2-5.9.0/misc/ss.c:4148:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(st.remote.data, &u->peer_name, data/iproute2-5.9.0/misc/ss.c:4188:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ll_name[16]; data/iproute2-5.9.0/misc/ss.c:4439:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char q_str[16]; data/iproute2-5.9.0/misc/ss.c:4594:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char procname[64] = {}; data/iproute2-5.9.0/misc/ss.c:4621:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((fp = fopen(procname, "r")) != NULL) { data/iproute2-5.9.0/misc/ss.c:4640:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dst_group_buf[30]; data/iproute2-5.9.0/misc/ss.c:4641:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dst_pid_buf[30]; data/iproute2-5.9.0/misc/ss.c:4725:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/misc/ss.c:4768:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cid_str[sizeof("4294967295")]; data/iproute2-5.9.0/misc/ss.c:4769:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char port_str[sizeof("4294967295")]; data/iproute2-5.9.0/misc/ss.c:4844:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(addr, "%u", node); data/iproute2-5.9.0/misc/ss.c:4845:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(port, "%u", identity); data/iproute2-5.9.0/misc/ss.c:5020:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024]; data/iproute2-5.9.0/misc/ss.c:5086:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[256], rem[256]; data/iproute2-5.9.0/misc/ss.c:5115:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/misc/ss.c:5499:17: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). filter_fp = fopen(optarg, "r"); data/iproute2-5.9.0/misc/ss.c:5612:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). dump_fp = fopen(dump_tcpdiag, "w"); data/iproute2-5.9.0/netem/maketable.c:209:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if (!(fp = fopen(argv[1], "r"))) { data/iproute2-5.9.0/netem/stats.c:67:8: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(argv[1], "r"); data/iproute2-5.9.0/rdma/dev.c:123:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/iproute2-5.9.0/rdma/dev.c:129:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(vp, &node_guid, sizeof(uint64_t)); data/iproute2-5.9.0/rdma/dev.c:139:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/iproute2-5.9.0/rdma/dev.c:145:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(vp, &sys_image_guid, sizeof(uint64_t)); data/iproute2-5.9.0/rdma/dev.c:279:10: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). netns = open(netns_path, O_RDONLY | O_CLOEXEC); data/iproute2-5.9.0/rdma/link.c:115:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[32]; data/iproute2-5.9.0/rdma/link.c:121:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(vp, &subnet_prefix, sizeof(uint64_t)); data/iproute2-5.9.0/rdma/rdma.c:60:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *largv[512]; data/iproute2-5.9.0/rdma/res-cmid.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char json_name[name_size]; data/iproute2-5.9.0/rdma/res-cmid.c:97:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char src_addr_str[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/rdma/res-cmid.c:98:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dst_addr_str[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/rdma/res-cmid.c:178:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. comm = (char *)mnl_attr_get_str( data/iproute2-5.9.0/rdma/res-cq.c:108:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. comm = (char *)mnl_attr_get_str( data/iproute2-5.9.0/rdma/res-mr.c:72:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. comm = (char *)mnl_attr_get_str( data/iproute2-5.9.0/rdma/res-pd.c:60:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. comm = (char *)mnl_attr_get_str( data/iproute2-5.9.0/rdma/res-qp.c:159:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. comm = (char *)mnl_attr_get_str( data/iproute2-5.9.0/rdma/res.c:155:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[18]; data/iproute2-5.9.0/rdma/res.c:176:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char tmp[64] = {}; data/iproute2-5.9.0/rdma/res.c:209:6: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). f = fopen(comm, "r"); data/iproute2-5.9.0/rdma/stat.c:83:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(output, " on"); data/iproute2-5.9.0/rdma/stat.c:87:3: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(output, " off"); data/iproute2-5.9.0/rdma/stat.c:97:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char output[128] = {}; data/iproute2-5.9.0/rdma/stat.c:249:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. comm = (char *)mnl_attr_get_str( data/iproute2-5.9.0/rdma/stat.c:605:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/rdma/utils.c:81:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *port = atoi(slash); data/iproute2-5.9.0/rdma/utils.c:195:11: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *idx = atoi(fe->value); data/iproute2-5.9.0/rdma/utils.c:697:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tc/em_ipset.c:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[IPSET_MAXNAMELEN]; data/iproute2-5.9.0/tc/em_ipset.c:239:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char setname[IPSET_MAXNAMELEN]; data/iproute2-5.9.0/tc/em_ipt.c:58:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(m->data, data, data_size); data/iproute2-5.9.0/tc/em_meta.c:200:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64] = {0}; data/iproute2-5.9.0/tc/em_meta.c:209:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "INT"); data/iproute2-5.9.0/tc/em_meta.c:213:7: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "VAR"); data/iproute2-5.9.0/tc/em_u32.c:84:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[a->len - nh_len + 1]; data/iproute2-5.9.0/tc/em_u32.c:87:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, a->data + nh_len, a->len - nh_len); data/iproute2-5.9.0/tc/f_flow.c:42:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char *flow_keys[FLOW_KEY_MAX+1] = { data/iproute2-5.9.0/tc/f_flower.c:109:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr[ETH_ALEN], *slash; data/iproute2-5.9.0/tc/f_flower.c:130:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(addr, &mask, ETH_ALEN); data/iproute2-5.9.0/tc/f_flower.c:316:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errmsg[128]; data/iproute2-5.9.0/tc/f_flower.c:1061:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[XATTR_SIZE_MAX], mask[XATTR_SIZE_MAX]; data/iproute2-5.9.0/tc/f_flower.c:1088:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&mask[mask_len], "ffff:ff:"); data/iproute2-5.9.0/tc/f_flower.c:1127:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[XATTR_SIZE_MAX], mask[XATTR_SIZE_MAX]; data/iproute2-5.9.0/tc/f_flower.c:1139:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(mask, "0xffffffff"); data/iproute2-5.9.0/tc/f_flower.c:1164:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char key[XATTR_SIZE_MAX], mask[XATTR_SIZE_MAX]; data/iproute2-5.9.0/tc/f_flower.c:1181:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(mask, str, index); data/iproute2-5.9.0/tc/f_flower.c:1182:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(mask + index, ":0xffffffff:0xff:0xff"); data/iproute2-5.9.0/tc/f_flower.c:1952:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out + done, "/%d", bits); data/iproute2-5.9.0/tc/f_flower.c:1971:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "ipv4"); data/iproute2-5.9.0/tc/f_flower.c:1973:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "ipv6"); data/iproute2-5.9.0/tc/f_flower.c:1975:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "arp"); data/iproute2-5.9.0/tc/f_flower.c:1977:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "rarp"); data/iproute2-5.9.0/tc/f_flower.c:1979:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "%04x", ntohs(eth_type)); data/iproute2-5.9.0/tc/f_flower.c:1997:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "tcp"); data/iproute2-5.9.0/tc/f_flower.c:1999:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "udp"); data/iproute2-5.9.0/tc/f_flower.c:2001:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "sctp"); data/iproute2-5.9.0/tc/f_flower.c:2003:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "icmp"); data/iproute2-5.9.0/tc/f_flower.c:2005:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "icmpv6"); data/iproute2-5.9.0/tc/f_flower.c:2007:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out, "%02x", ip_proto); data/iproute2-5.9.0/tc/f_flower.c:2099:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out + done, "/%d", bits); data/iproute2-5.9.0/tc/f_flower.c:2134:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. done = sprintf(out, "%u", rta_getattr_be16(min_attr)); data/iproute2-5.9.0/tc/f_flower.c:2135:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out + done, "-%u", rta_getattr_be16(max_attr)); data/iproute2-5.9.0/tc/f_flower.c:2152:9: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. done = sprintf(out, "0x%x", rta_getattr_be16(flags_attr)); data/iproute2-5.9.0/tc/f_flower.c:2154:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out + done, "/%x", rta_getattr_be16(mask_attr)); data/iproute2-5.9.0/tc/f_flower.c:2263:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[rem * 2 + 1]; data/iproute2-5.9.0/tc/f_flower.c:2313:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(strbuf, "%u", gbp); data/iproute2-5.9.0/tc/f_flower.c:2345:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(strbuf, "%u:%u:%u:%u", ver, idx, dir, hwid); data/iproute2-5.9.0/tc/f_flower.c:2452:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. done = sprintf(out, "%d", value); data/iproute2-5.9.0/tc/f_flower.c:2455:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out + done, "/%d", mask); data/iproute2-5.9.0/tc/f_fw.c:96:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ+1] = {}; data/iproute2-5.9.0/tc/f_rsvp.c:359:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/tc/f_rsvp.c:386:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[128]; data/iproute2-5.9.0/tc/f_u32.c:825:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[256]; data/iproute2-5.9.0/tc/f_u32.c:885:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[256]; data/iproute2-5.9.0/tc/f_u32.c:1120:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char ind[IFNAMSIZ + 1] = {}; data/iproute2-5.9.0/tc/m_action.c:93:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/m_action.c:129:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(str, "gact"); data/iproute2-5.9.0/tc/m_action.c:211:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/m_action.c:218:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char act_ck[TC_COOKIE_MAX_SIZE]; data/iproute2-5.9.0/tc/m_action.c:286:6: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cookie_err_m[128]; data/iproute2-5.9.0/tc/m_action.c:387:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char b1[strsz * 2 + 1]; data/iproute2-5.9.0/tc/m_action.c:536:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/m_action.c:550:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/m_action.c:656:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/m_action.c:693:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/m_action.c:697:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/m_ct.c:175:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char errmsg[128]; data/iproute2-5.9.0/tc/m_ct.c:361:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out[256] = ""; data/iproute2-5.9.0/tc/m_ct.c:369:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. done += sprintf(out + done, "src"); data/iproute2-5.9.0/tc/m_ct.c:372:11: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. done += sprintf(out + done, "dst"); data/iproute2-5.9.0/tc/m_ct.c:410:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char out[256], *p; data/iproute2-5.9.0/tc/m_ematch.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/iproute2-5.9.0/tc/m_ematch.c:57:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fd = fopen(file, "r"); data/iproute2-5.9.0/tc/m_ematch.c:63:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[512], *p = buf; data/iproute2-5.9.0/tc/m_ematch.c:94:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[512]; data/iproute2-5.9.0/tc/m_ematch.c:95:13: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fd = fopen(file, "r"); data/iproute2-5.9.0/tc/m_ematch.c:101:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char namebuf[512], *p = buf; data/iproute2-5.9.0/tc/m_ematch.c:134:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/m_ematch.c:166:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[513]; data/iproute2-5.9.0/tc/m_ematch.c:220:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/tc/m_ematch.c:541:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[b->len+1]; data/iproute2-5.9.0/tc/m_ematch.c:543:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, b->data, b->len); data/iproute2-5.9.0/tc/m_ematch.h:81:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char kind[EMATCHKINDSIZ]; data/iproute2-5.9.0/tc/m_gate.c:430:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[22]; data/iproute2-5.9.0/tc/m_gate.c:495:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[22]; data/iproute2-5.9.0/tc/m_ife.c:61:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dbuf[ETH_ALEN]; data/iproute2-5.9.0/tc/m_ife.c:62:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sbuf[ETH_ALEN]; data/iproute2-5.9.0/tc/m_ipt.c:118:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(merge, oldopts, num_old * sizeof(struct option)); data/iproute2-5.9.0/tc/m_ipt.c:160:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char path[strlen(lib_dir) + sizeof("/libipt_.so") + strlen(name)]; data/iproute2-5.9.0/tc/m_ipt.c:289:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/m_mirred.c:101:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/m_pedit.c:82:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/m_pedit.c:316:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(val, addr.data, addr.bytelen); data/iproute2-5.9.0/tc/m_pedit.c:527:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/m_pedit.h:68:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[PEDITKINDSIZ]; data/iproute2-5.9.0/tc/m_skbmod.c:57:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char dbuf[ETH_ALEN]; data/iproute2-5.9.0/tc/m_skbmod.c:58:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char sbuf[ETH_ALEN]; data/iproute2-5.9.0/tc/m_tunnel_key.c:538:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char strbuf[rem * 2 + 1]; data/iproute2-5.9.0/tc/m_tunnel_key.c:539:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char data[rem * 2 + 1]; data/iproute2-5.9.0/tc/m_xt.c:157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/m_xt_old.c:104:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(merge, oldopts, num_old * sizeof(struct option)); data/iproute2-5.9.0/tc/m_xt_old.c:216:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/q_atm.c:55:11: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char hdr[MAX_HDR_LEN]; data/iproute2-5.9.0/tc/q_atm.c:186:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buffer[MAX_ATM_ADDR_LEN+1]; data/iproute2-5.9.0/tc/q_atm.c:222:5: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/tc/q_cake.c:42:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * diffserv_names[CAKE_DIFFSERV_MAX] = { data/iproute2-5.9.0/tc/q_cake.c:50:14: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static const char * flowmode_names[CAKE_FLOW_MAX] = { data/iproute2-5.9.0/tc/q_cbq.c:500:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/tc/q_cbq.c:536:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/tc/q_cbq.c:566:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[64]; data/iproute2-5.9.0/tc/q_codel.c:192:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&_st, st, RTA_PAYLOAD(xstats)); data/iproute2-5.9.0/tc/q_fq.c:401:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&_st, RTA_DATA(xstats), min(RTA_PAYLOAD(xstats), sizeof(*st))); data/iproute2-5.9.0/tc/q_fq_codel.c:256:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&_st, st, RTA_PAYLOAD(xstats)); data/iproute2-5.9.0/tc/q_fq_pie.c:285:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&_st, st, RTA_PAYLOAD(xstats)); data/iproute2-5.9.0/tc/q_htb.c:339:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(b1, "%d.%d", gopt->version >> 16, gopt->version & 0xffff); data/iproute2-5.9.0/tc/q_netem.c:138:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[128]; data/iproute2-5.9.0/tc/q_netem.c:141:11: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). if ((f = fopen(name, "r")) == NULL) { data/iproute2-5.9.0/tc/tc.c:113:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/tc.c:157:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/tc.c:259:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *largv[100]; data/iproute2-5.9.0/tc/tc_class.c:62:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[4096]; data/iproute2-5.9.0/tc/tc_class.c:71:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_class.c:72:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ] = {}; data/iproute2-5.9.0/tc/tc_class.c:172:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(node->data, data, len); data/iproute2-5.9.0/tc/tc_class.c:184:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char spaces[100] = {0}; data/iproute2-5.9.0/tc/tc_class.c:192:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "| "); data/iproute2-5.9.0/tc/tc_class.c:194:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, " "); data/iproute2-5.9.0/tc/tc_class.c:201:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "| |"); data/iproute2-5.9.0/tc/tc_class.c:203:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, "| "); data/iproute2-5.9.0/tc/tc_class.c:205:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, " |"); data/iproute2-5.9.0/tc/tc_class.c:207:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, " "); data/iproute2-5.9.0/tc/tc_class.c:219:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char cls_id_str[256] = {}; data/iproute2-5.9.0/tc/tc_class.c:222:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[300] = {}; data/iproute2-5.9.0/tc/tc_class.c:253:4: [2] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant string. strcat(buf, " [unknown qdisc kind] "); data/iproute2-5.9.0/tc/tc_class.c:307:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[256]; data/iproute2-5.9.0/tc/tc_class.c:391:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_class.c:392:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[1024] = {0}; data/iproute2-5.9.0/tc/tc_core.c:238:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("/proc/net/psched", "r"); data/iproute2-5.9.0/tc/tc_exec.c:47:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/tc_exec.c:88:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char kind[FILTER_NAMESZ] = {}; data/iproute2-5.9.0/tc/tc_filter.c:58:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/tc_filter.c:66:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/tc_filter.c:81:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_filter.c:82:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ] = {}; data/iproute2-5.9.0/tc/tc_filter.c:253:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[256]; data/iproute2-5.9.0/tc/tc_filter.c:384:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/tc_filter.c:408:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_filter.c:409:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ] = {}; data/iproute2-5.9.0/tc/tc_filter.c:591:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MAX_MSG]; data/iproute2-5.9.0/tc/tc_filter.c:598:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_monitor.c:95:14: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). FILE *fp = fopen(file, "r"); data/iproute2-5.9.0/tc/tc_qdisc.c:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_qdisc.c:56:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char k[FILTER_NAMESZ] = {}; data/iproute2-5.9.0/tc/tc_qdisc.c:60:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[TCA_BUF_MAX]; data/iproute2-5.9.0/tc/tc_qdisc.c:226:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char abuf[256]; data/iproute2-5.9.0/tc/tc_qdisc.c:271:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(abuf, "%x:", t->tcm_handle >> 16); data/iproute2-5.9.0/tc/tc_qdisc.c:274:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(abuf, "[%08x]", t->tcm_handle); data/iproute2-5.9.0/tc/tc_qdisc.c:359:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256]; data/iproute2-5.9.0/tc/tc_qdisc.c:366:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char d[IFNAMSIZ] = {}; data/iproute2-5.9.0/tc/tc_util.c:136:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(handle, "root"); data/iproute2-5.9.0/tc/tc_util.c:147:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char clname[IDNAME_MAX] = {}; data/iproute2-5.9.0/tc/tc_util.c:163:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(buf, "???"); data/iproute2-5.9.0/tc/tc_util.c:258:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char r_str[20]; data/iproute2-5.9.0/tc/tc_util.c:268:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char r_str[20]; data/iproute2-5.9.0/tc/tc_util.c:334:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char *units[5] = {"", "K", "M", "G", "T"}; data/iproute2-5.9.0/tc/tc_util.c:456:9: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. static char buf[64]; data/iproute2-5.9.0/tc/tc_util.c:961:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mask_name[SPRINT_BSIZE-6]; data/iproute2-5.9.0/tc/tc_util.c:970:10: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. done = sprintf(out, "%u", value); data/iproute2-5.9.0/tc/tc_util.c:972:4: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(out + done, "/0x%x", mask); data/iproute2-5.9.0/tc/tc_util.h:50:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/tc_util.h:59:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[FILTER_NAMESZ]; data/iproute2-5.9.0/tc/tc_util.h:69:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char id[FILTER_NAMESZ]; data/iproute2-5.9.0/testsuite/tools/generate_nlmsg.c:21:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bcmac[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; data/iproute2-5.9.0/testsuite/tools/generate_nlmsg.c:96:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[16384] = { 0 }; data/iproute2-5.9.0/testsuite/tools/generate_nlmsg.c:105:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen("tests/ip/link/dev_wo_vf_rate.nl", "w"); data/iproute2-5.9.0/tipc/bearer.c:105:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mnl_msg[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:154:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ip4addr.sin_addr, RTA_DATA(addr_attr), data/iproute2-5.9.0/tipc/bearer.c:160:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&ip6addr.sin6_addr, RTA_DATA(addr_attr), data/iproute2-5.9.0/tipc/bearer.c:200:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/tipc/bearer.c:211:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr[INET6_ADDRSTRLEN] = {0}; data/iproute2-5.9.0/tipc/bearer.c:299:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bname[TIPC_MAX_BEARER_NAME]; data/iproute2-5.9.0/tipc/bearer.c:402:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:485:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:518:49: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mnl_attr_put_u32(nlh, TIPC_NLA_BEARER_DOMAIN, atoi(opt->val)); data/iproute2-5.9.0/tipc/bearer.c:524:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mnl_attr_put_u32(nlh, TIPC_NLA_PROP_PRIO, atoi(opt->val)); data/iproute2-5.9.0/tipc/bearer.c:566:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:631:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:662:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). val = atoi(shift_cmdl(cmdl)); data/iproute2-5.9.0/tipc/bearer.c:759:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char straddr[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/tipc/bearer.c:823:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char straddr[INET6_ADDRSTRLEN]; data/iproute2-5.9.0/tipc/bearer.c:879:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:959:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/bearer.c:1059:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:63:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:244:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:287:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:553:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:629:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:656:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). val = atoi(shift_cmdl(cmdl)); data/iproute2-5.9.0/tipc/link.c:707:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:766:6: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). atoi(opt->val)); data/iproute2-5.9.0/tipc/link.c:791:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:798:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). size = atoi(shift_cmdl(cmdl)); data/iproute2-5.9.0/tipc/link.c:844:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:886:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char state_str[2] = {0}; data/iproute2-5.9.0/tipc/link.c:892:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(state_str, "%c", map_get(up_map, i) ? 'U' : 'D'); data/iproute2-5.9.0/tipc/link.c:910:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr_str[16]; data/iproute2-5.9.0/tipc/link.c:911:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char full_state[17] = {0}; data/iproute2-5.9.0/tipc/link.c:917:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(addr_str, "%x:", members[i]); data/iproute2-5.9.0/tipc/link.c:930:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char addr_str[16]; data/iproute2-5.9.0/tipc/link.c:932:2: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(addr_str, "%u.%u.%u", tipc_zone(addr), tipc_cluster(addr), data/iproute2-5.9.0/tipc/link.c:956:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char status[16]; data/iproute2-5.9.0/tipc/link.c:957:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char monitored[16]; data/iproute2-5.9.0/tipc/link.c:967:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(monitored, "direct") : data/iproute2-5.9.0/tipc/link.c:968:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(monitored, "indirect"); data/iproute2-5.9.0/tipc/link.c:971:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(status, "up") : data/iproute2-5.9.0/tipc/link.c:972:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(status, "down"); data/iproute2-5.9.0/tipc/link.c:1007:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:1083:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/link.c:1084:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char bname[TIPC_MAX_BEARER_NAME] = {0}; data/iproute2-5.9.0/tipc/link.c:1179:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/media.c:48:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/media.c:92:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/media.c:182:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/media.c:211:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). val = atoi(shift_cmdl(cmdl)); data/iproute2-5.9.0/tipc/misc.c:87:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(id, str, len); data/iproute2-5.9.0/tipc/misc.c:119:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(key->key, str, len); data/iproute2-5.9.0/tipc/misc.c:144:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str, id, 16); data/iproute2-5.9.0/tipc/misc.c:149:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(&str[2 * i], "%02x", id[i]); data/iproute2-5.9.0/tipc/msg.c:78:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/msg.c:118:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/nametable.c:36:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[33] = {0,}; data/iproute2-5.9.0/tipc/nametable.c:85:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:31:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[33] = {}; data/iproute2-5.9.0/tipc/node.c:55:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:76:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:129:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:184:4: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mem[TIPC_AEAD_KEY_SIZE_MAX]; data/iproute2-5.9.0/tipc/node.c:194:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:222:3: [2] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant string. strcpy(input.key.alg_name, "gcm(aes)"); data/iproute2-5.9.0/tipc/node.c:251:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:271:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char str[33] = {0,}; data/iproute2-5.9.0/tipc/node.c:296:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:334:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:353:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/node.c:371:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). netid = atoi(shift_cmdl(cmdl)); data/iproute2-5.9.0/tipc/peer.c:33:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/peer.c:46:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). addr = atoi(str); data/iproute2-5.9.0/tipc/socket.c:49:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/tipc/socket.c:106:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[MNL_SOCKET_BUFFER_SIZE]; data/iproute2-5.9.0/devlink/devlink.c:420:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str1) > strlen(str2)) data/iproute2-5.9.0/devlink/devlink.c:420:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str1) > strlen(str2)) data/iproute2-5.9.0/devlink/devlink.c:422:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strncmp(str1, str2, strlen(str1)); data/iproute2-5.9.0/devlink/devlink.c:3190:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). err = read(pipe_r, &err2, sizeof(err2)); data/iproute2-5.9.0/devlink/devlink.c:5458:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path_len += strlen(parent_resource->name) + 1; data/iproute2-5.9.0/devlink/devlink.c:5468:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path -= strlen(parent_resource->name); data/iproute2-5.9.0/devlink/devlink.c:5470:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(parent_resource->name)); data/iproute2-5.9.0/devlink/devlink.c:5471:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path -= strlen(del); data/iproute2-5.9.0/devlink/devlink.c:5472:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcpy(path, del, strlen(del)); data/iproute2-5.9.0/genl/ctrl.c:248:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). d, strlen(d) + 1); data/iproute2-5.9.0/genl/genl.c:89:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(f->name, str, 15); data/iproute2-5.9.0/ip/ip.c:334:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(basename) > 2) data/iproute2-5.9.0/ip/ipaddress.c:1860:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(filter.kind)); data/iproute2-5.9.0/ip/ipaddress.c:2011:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). soff = strlen(*argv) - strlen("_slave"); data/iproute2-5.9.0/ip/ipaddress.c:2011:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). soff = strlen(*argv) - strlen("_slave"); data/iproute2-5.9.0/ip/ipaddress.c:2226:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t len = strlen(dev); data/iproute2-5.9.0/ip/ipaddress.c:2318:49: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), IFA_LABEL, l, strlen(l)+1); data/iproute2-5.9.0/ip/ipl2tp.c:670:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(*argv); data/iproute2-5.9.0/ip/ipl2tp.c:681:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(*argv); data/iproute2-5.9.0/ip/iplink.c:809:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(*argv); data/iproute2-5.9.0/ip/iplink.c:1023:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). IFLA_IFNAME, name, strlen(name) + 1); data/iproute2-5.9.0/ip/iplink.c:1052:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(type)); data/iproute2-5.9.0/ip/iplink.c:1110:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name, strlen(name) + 1); data/iproute2-5.9.0/ip/iplink.c:1639:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name, strlen(name) + 1); data/iproute2-5.9.0/ip/iplink_vrf.c:130:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name, strlen(name) + 1); data/iproute2-5.9.0/ip/iplink_vrf.c:197:52: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), IFLA_IFNAME, name, strlen(name) + 1); data/iproute2-5.9.0/ip/ipmacsec.c:755:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pad = strlen(names[i]) + 1; data/iproute2-5.9.0/ip/ipmaddr.c:145:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(m.name); data/iproute2-5.9.0/ip/ipnetns.c:213:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c = malloc(sizeof(*c) + strlen(name) + 1); data/iproute2-5.9.0/ip/ipnetns.c:979:17: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ssize_t len = read(fd, buf, sizeof(buf)); data/iproute2-5.9.0/ip/ipnetns.c:1000:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return !*name || strlen(name) > NAME_MAX || data/iproute2-5.9.0/ip/ipntable.c:95:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(namep) + 1; data/iproute2-5.9.0/ip/iproute.c:802:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(b1, "default", sizeof(b1)); data/iproute2-5.9.0/ip/iproute.c:1351:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(*argv)); data/iproute2-5.9.0/ip/iproute.c:1582:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(buffer); data/iproute2-5.9.0/ip/iproute.c:1860:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (*argv)[strlen(*argv) - 1] == '/') data/iproute2-5.9.0/ip/iproute_lwtunnel.c:822:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(annotation) + 1); data/iproute2-5.9.0/ip/iproute_lwtunnel.c:930:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(segbuf, *argv, 1024); data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1044:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1057:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1068:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t token_len = strlen(token); data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1146:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1159:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1172:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/ip/iproute_lwtunnel.c:1185:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/ip/iprule.c:918:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *argv, strlen(*argv)+1); data/iproute2-5.9.0/ip/iprule.c:924:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *argv, strlen(*argv)+1); data/iproute2-5.9.0/ip/ipseg6.c:157:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(opts.pass)); data/iproute2-5.9.0/ip/ipseg6.c:159:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(opts.pass)) data/iproute2-5.9.0/ip/ipseg6.c:161:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). opts.pass, strlen(opts.pass)); data/iproute2-5.9.0/ip/iptuntap.c:308:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). const size_t linkbuf_len = strlen(dev_net_tun) + 2; data/iproute2-5.9.0/ip/ipvrf.c:395:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(netns, "/"); data/iproute2-5.9.0/ip/ipvrf.c:429:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (write(fd, pid, strlen(pid)) < 0) { data/iproute2-5.9.0/ip/ipvrf.c:489:5: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(vrf_filter.kind)); data/iproute2-5.9.0/ip/ipxfrm.c:359:3: [1] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). Risk is low because the source is a constant character. strcpy(str, "-"); data/iproute2-5.9.0/ip/xfrm_policy.c:141:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(*argv); data/iproute2-5.9.0/ip/xfrm_policy.c:227:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(s) + 1; data/iproute2-5.9.0/ip/xfrm_state.c:125:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int slen = strlen(key); data/iproute2-5.9.0/ip/xfrm_state.c:197:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(*argv); data/iproute2-5.9.0/ip/xfrm_state.c:244:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(*argv); data/iproute2-5.9.0/lib/bpf.c:245:15: [1] (buffer) fgetc: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while ((c = fgetc(fp)) != EOF) { data/iproute2-5.9.0/lib/bpf.c:579:9: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (fscanf(fp, "%*s %" textify(PATH_MAX) "s %99s %*s %*d %*d\n", data/iproute2-5.9.0/lib/bpf.c:624:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(fd_in, buff, sizeof(buff)); data/iproute2-5.9.0/lib/bpf.c:807:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(pathname) > 2 && pathname[0] == 'm' && data/iproute2-5.9.0/lib/bpf.c:1211:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). unsigned int off = 0, len = strlen(ctx->log); data/iproute2-5.9.0/lib/bpf.c:1352:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). size = read(ofd, out, len); data/iproute2-5.9.0/lib/bpf.c:1471:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) + strlen(sub) + 2 > PATH_MAX) data/iproute2-5.9.0/lib/bpf.c:1471:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tmp) + strlen(sub) + 2 > PATH_MAX) data/iproute2-5.9.0/lib/bpf.c:1475:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(tmp, "/"); data/iproute2-5.9.0/lib/bpf.c:2850:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if (read(fd, tmp, sizeof(tmp)) > 0) data/iproute2-5.9.0/lib/cg_map.c:54:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). cg = malloc(sizeof(*cg) + strlen(path) + 1); data/iproute2-5.9.0/lib/cg_map.c:101:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mntlen = strlen(mnt); data/iproute2-5.9.0/lib/fs.c:48:9: [1] (buffer) fscanf: It's unclear if the %s limit in the format string is small enough (CWE-120). Check that the limit is sufficiently small, or use a different input function. while (fscanf(fp, "%*s %4095s %127s %*s %*d %*d\n", data/iproute2-5.9.0/lib/fs.c:222:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). path = strdup(link_buf + strlen(mnt)); data/iproute2-5.9.0/lib/libgenl.c:57:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). family, strlen(family) + 1); data/iproute2-5.9.0/lib/libnetlink.c:76:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (msg[strlen(msg) - 1] != '.') data/iproute2-5.9.0/lib/libnetlink.c:1249:41: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return addattr_l(n, maxlen, type, str, strlen(str)+1); data/iproute2-5.9.0/lib/ll_map.c:89:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). im = malloc(sizeof(*im) + strlen(ifname) + 1); data/iproute2-5.9.0/lib/ll_map.c:293:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name, strlen(name) + 1); data/iproute2-5.9.0/lib/names.c:146:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(name, entry->name, IDNAME_MAX); data/iproute2-5.9.0/lib/namespace.c:26:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) >= NAME_MAX) data/iproute2-5.9.0/lib/rt_names.c:171:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(de->d_name); data/iproute2-5.9.0/lib/rt_names.c:403:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(de->d_name); data/iproute2-5.9.0/lib/utils.c:842:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) >= IFNAMSIZ) data/iproute2-5.9.0/lib/utils.c:859:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, name, IFNAMSIZ); data/iproute2-5.9.0/lib/utils.c:1158:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) % 2) data/iproute2-5.9.0/lib/utils.c:1160:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). while (cnt < blen && strlen(str) > 1) { data/iproute2-5.9.0/lib/utils.c:1164:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(tmpstr, str, 2); data/iproute2-5.9.0/lib/utils.c:1256:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tstr[strlen(tstr)-1] = 0; data/iproute2-5.9.0/lib/utils.c:1347:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *lenp = strlen(*linep) + strlen(line1) + 1; data/iproute2-5.9.0/lib/utils.c:1347:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). *lenp = strlen(*linep) + strlen(line1) + 1; data/iproute2-5.9.0/lib/utils.c:1415:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). tstr[strlen(tstr)-1] = 0; data/iproute2-5.9.0/lib/utils.c:1437:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(arg) != GUID_STR_LEN) data/iproute2-5.9.0/lib/utils.c:1549:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t srclen = strlen(src); data/iproute2-5.9.0/lib/utils.c:1562:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t dlen = strlen(dst); data/iproute2-5.9.0/lib/utils.c:1565:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return dlen + strlen(src); data/iproute2-5.9.0/misc/arpd.c:202:70: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (setsockopt(udp_sock, SOL_SOCKET, SO_BINDTODEVICE, ifr.ifr_name, strlen(ifr.ifr_name)+1) < 0) data/iproute2-5.9.0/misc/ifstat.c:251:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf[strlen(buf)-1] = 0; data/iproute2-5.9.0/misc/ifstat.c:254:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(info_source, buf+1, sizeof(info_source)-1); data/iproute2-5.9.0/misc/ifstat.c:758:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). name_len = strlen(name); data/iproute2-5.9.0/misc/ifstat.c:903:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (bind(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) < 0) { data/iproute2-5.9.0/misc/ifstat.c:986:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0 data/iproute2-5.9.0/misc/ifstat.c:988:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0)) data/iproute2-5.9.0/misc/lnstat.c:201:25: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (cname - fname >= strlen(fname)) data/iproute2-5.9.0/misc/lnstat_util.c:125:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(lf->fields[i].name, tok, LNSTAT_MAX_FIELD_NAME_LEN); data/iproute2-5.9.0/misc/lnstat_util.c:153:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, RTSTAT_COMPAT_LINE, sizeof(buf) - 1); data/iproute2-5.9.0/misc/lnstat_util.c:238:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(lf->basename, "rt_cache", sizeof(lf->basename)); data/iproute2-5.9.0/misc/nstat.c:136:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). buf[strlen(buf)-1] = 0; data/iproute2-5.9.0/misc/nstat.c:219:5: [1] (buffer) strncat: Easily used incorrectly (e.g., incorrectly computing the correct maximum size to add) [MS-banned] (CWE-120). Consider strcat_s, strlcat, snprintf, or automatically resizing strings. strncat(idbuf, p, sizeof(idbuf) - off - 1); data/iproute2-5.9.0/misc/nstat.c:649:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (bind(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) < 0) { data/iproute2-5.9.0/misc/nstat.c:725:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0 data/iproute2-5.9.0/misc/nstat.c:727:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0)) data/iproute2-5.9.0/misc/rtacct.c:83:11: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int n = read(fd, buf+count, tot-count); data/iproute2-5.9.0/misc/rtacct.c:514:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (bind(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) < 0) { data/iproute2-5.9.0/misc/rtacct.c:596:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). (connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0 data/iproute2-5.9.0/misc/rtacct.c:598:45: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). connect(fd, (struct sockaddr *)&sun, 2+1+strlen(sun.sun_path+1)) == 0)) data/iproute2-5.9.0/misc/ss.c:594:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) == 0 || name[strlen(name)-1] != '/') data/iproute2-5.9.0/misc/ss.c:594:32: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(name) == 0 || name[strlen(name)-1] != '/') data/iproute2-5.9.0/misc/ss.c:595:3: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(name, "/"); data/iproute2-5.9.0/misc/ss.c:597:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nameoff = strlen(name); data/iproute2-5.9.0/misc/ss.c:618:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pos = strlen(name); data/iproute2-5.9.0/misc/ss.c:645:30: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strncmp(lnk, pattern, strlen(pattern))) data/iproute2-5.9.0/misc/ss.c:1179:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). c->width = c->max_len + strlen(c->ldelim); data/iproute2-5.9.0/misc/ss.c:1458:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(buf+strlen(buf), "%d%s", secs, msecs ? "." : "sec"); data/iproute2-5.9.0/misc/ss.c:1461:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sprintf(buf+strlen(buf), "%03dms", msecs); data/iproute2-5.9.0/misc/ss.c:1697:40: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return p == NULL || (p[0] == '@' && strlen(p) == 6 && data/iproute2-5.9.0/misc/ss.c:2128:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). a.addr.bitlen = 8*strlen(p); data/iproute2-5.9.0/misc/ss.c:2757:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int n = strlen(line); data/iproute2-5.9.0/misc/ss.c:2978:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(s.cong_alg, data/iproute2-5.9.0/misc/ss.c:4615:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(procname, "kernel", 7); data/iproute2-5.9.0/misc/ss.c:4623:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). snprintf(procname+strlen(procname), data/iproute2-5.9.0/misc/ss.c:4624:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). sizeof(procname)-strlen(procname), data/iproute2-5.9.0/misc/ss.c:5022:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int protolen = strlen(proto); data/iproute2-5.9.0/misc/ss.c:5023:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int keylen = strlen(key); data/iproute2-5.9.0/rdma/res-cmid.c:55:37: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int name_size = INET6_ADDRSTRLEN + strlen(":65535"); data/iproute2-5.9.0/rdma/stat.c:59:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int i, outlen = strlen(s); data/iproute2-5.9.0/rdma/stat.c:68:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). outlen += strlen(auto_params[i].name) + 1; data/iproute2-5.9.0/rdma/stat.c:72:6: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(output, " "); data/iproute2-5.9.0/rdma/stat.c:75:6: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(output, ","); data/iproute2-5.9.0/rdma/stat.c:81:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (outlen + strlen(" on") >= len) data/iproute2-5.9.0/rdma/stat.c:85:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (outlen + strlen(" off") >= len) data/iproute2-5.9.0/rdma/utils.c:25:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str1) > strlen(str2)) data/iproute2-5.9.0/rdma/utils.c:25:21: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str1) > strlen(str2)) data/iproute2-5.9.0/rdma/utils.c:27:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strncmp(str1, str2, strlen(str1)); data/iproute2-5.9.0/rdma/utils.c:83:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!*port && strlen(slash)) data/iproute2-5.9.0/rdma/utils.c:157:29: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strspn(value, cset) != strlen(value)) { data/iproute2-5.9.0/rdma/utils.c:175:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (idx = 0; idx < strlen(fe->value); idx++) data/iproute2-5.9.0/rdma/utils.c:286:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) == strlen(val) && data/iproute2-5.9.0/rdma/utils.c:286:24: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) == strlen(val) && data/iproute2-5.9.0/tc/em_ipset.c:137:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(setname, req.set.name, IPSET_MAXNAMELEN); data/iproute2-5.9.0/tc/em_meta.c:218:6: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, ","); data/iproute2-5.9.0/tc/em_u32.c:82:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). nh_len = strlen("nexthdr+"); data/iproute2-5.9.0/tc/f_flower.c:311:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen_mask = strlen(mask); data/iproute2-5.9.0/tc/f_flower.c:314:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(str); data/iproute2-5.9.0/tc/f_flower.c:364:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(flower_ct_states[i].str); data/iproute2-5.9.0/tc/f_flower.c:871:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/tc/f_flower.c:884:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/tc/f_flower.c:895:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t token_len = strlen(token); data/iproute2-5.9.0/tc/f_flower.c:961:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/tc/f_flower.c:974:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/tc/f_flower.c:987:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/tc/f_flower.c:1000:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (!strlen(token)) data/iproute2-5.9.0/tc/f_flower.c:1043:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key_len = strlen(key); data/iproute2-5.9.0/tc/f_flower.c:1045:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(key) == key_len) data/iproute2-5.9.0/tc/f_flower.c:1048:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key_len = strlen(key) - 1; data/iproute2-5.9.0/tc/f_flower.c:1074:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if ((key_len + strlen(token) > XATTR_SIZE_MAX) || data/iproute2-5.9.0/tc/f_flower.c:1079:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). key_len += strlen(token) + 1; data/iproute2-5.9.0/tc/f_flower.c:1084:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (mask_len + strlen(token) > XATTR_SIZE_MAX) data/iproute2-5.9.0/tc/f_flower.c:1087:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). data_len = strlen(rindex(token, ':')); data/iproute2-5.9.0/tc/f_flower.c:1097:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (mask_len + strlen(slash + 1) > XATTR_SIZE_MAX) data/iproute2-5.9.0/tc/f_flower.c:1101:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). mask_len += strlen(slash + 1) + 1; data/iproute2-5.9.0/tc/f_flower.c:1135:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(slash) > XATTR_SIZE_MAX) data/iproute2-5.9.0/tc/f_flower.c:1142:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) > XATTR_SIZE_MAX) data/iproute2-5.9.0/tc/f_flower.c:1173:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(slash) > XATTR_SIZE_MAX) data/iproute2-5.9.0/tc/f_flower.c:1185:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(str) > XATTR_SIZE_MAX) data/iproute2-5.9.0/tc/f_flower.c:2291:12: [1] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source is a constant character. slen += sprintf(strbuf + slen, ","); data/iproute2-5.9.0/tc/f_fw.c:104:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d) - 1); data/iproute2-5.9.0/tc/f_fw.c:105:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(n, MAX_MSG, TCA_FW_INDEV, d, strlen(d) + 1); data/iproute2-5.9.0/tc/f_u32.c:206:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) > strlen("nexthdr+") && data/iproute2-5.9.0/tc/f_u32.c:206:18: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(p) > strlen("nexthdr+") && data/iproute2-5.9.0/tc/f_u32.c:207:28: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). memcmp(p, "nexthdr+", strlen("nexthdr+")) == 0) { data/iproute2-5.9.0/tc/f_u32.c:209:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen("nexthdr+"); data/iproute2-5.9.0/tc/f_u32.c:1128:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(ind, *argv, sizeof(ind) - 1); data/iproute2-5.9.0/tc/f_u32.c:1130:7: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(ind) + 1); data/iproute2-5.9.0/tc/m_action.c:135:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(a->id, "noact", 15); data/iproute2-5.9.0/tc/m_action.c:250:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(k, "gact", sizeof(k) - 1); data/iproute2-5.9.0/tc/m_action.c:252:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k) - 1); data/iproute2-5.9.0/tc/m_action.c:269:43: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(n, MAX_MSG, TCA_ACT_KIND, k, strlen(k) + 1); data/iproute2-5.9.0/tc/m_action.c:284:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(*argv); data/iproute2-5.9.0/tc/m_action.c:573:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k) - 1); data/iproute2-5.9.0/tc/m_action.c:612:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, MAX_MSG, TCA_ACT_KIND, k, strlen(k) + 1); data/iproute2-5.9.0/tc/m_action.c:706:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k) - 1); data/iproute2-5.9.0/tc/m_action.c:721:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k) - 1); data/iproute2-5.9.0/tc/m_action.c:733:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, MAX_MSG, TCA_ACT_KIND, k, strlen(k) + 1); data/iproute2-5.9.0/tc/m_ct.c:39:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, str, sizeof(buffer) - 1); data/iproute2-5.9.0/tc/m_ct.c:74:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buffer, str, sizeof(buffer) - 1); data/iproute2-5.9.0/tc/m_ct.c:170:15: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen_mask = strlen(mask); data/iproute2-5.9.0/tc/m_ct.c:173:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). slen = strlen(str); data/iproute2-5.9.0/tc/m_ematch.c:79:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(dst, namebuf, len - 1); data/iproute2-5.9.0/tc/m_ematch.c:226:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(buf, (char *) t->args->data, sizeof(buf)-1); data/iproute2-5.9.0/tc/m_ematch.c:532:11: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). b->len = strlen(text); data/iproute2-5.9.0/tc/m_ematch.h:39:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(text); data/iproute2-5.9.0/tc/m_ipt.c:160:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char path[strlen(lib_dir) + sizeof("/libipt_.so") + strlen(name)]; data/iproute2-5.9.0/tc/m_ipt.c:160:54: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). char path[strlen(lib_dir) + sizeof("/libipt_.so") + strlen(name)]; data/iproute2-5.9.0/tc/m_ipt.c:166:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). new_name = calloc(1, strlen(name) + 1); data/iproute2-5.9.0/tc/m_ipt.c:167:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). lname = calloc(1, strlen(name) + 1); data/iproute2-5.9.0/tc/m_ipt.c:179:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < strlen(name); i++) { data/iproute2-5.9.0/tc/m_ipt.c:187:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for (i = 0; i < strlen(new_name); i++) { data/iproute2-5.9.0/tc/m_ipt.c:393:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tname) > 16) { data/iproute2-5.9.0/tc/m_ipt.c:397:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = 1 + strlen(tname); data/iproute2-5.9.0/tc/m_ipt.c:399:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, tname, size); data/iproute2-5.9.0/tc/m_mirred.c:173:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(d)) data/iproute2-5.9.0/tc/m_mirred.c:176:5: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/m_pedit.c:530:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k) - 1); data/iproute2-5.9.0/tc/m_simple.c:145:19: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (simpdata && (strlen(simpdata) > (SIMP_MAX_DATA - 1))) { data/iproute2-5.9.0/tc/m_simple.c:147:4: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(simpdata), simpdata); data/iproute2-5.9.0/tc/m_tunnel_key.c:173:23: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size_t token_len = strlen(token); data/iproute2-5.9.0/tc/m_xt.c:97:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(target->t->u.user.name, target->name, data/iproute2-5.9.0/tc/m_xt.c:279:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tname) >= 16) { data/iproute2-5.9.0/tc/m_xt.c:283:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = 1 + strlen(tname); data/iproute2-5.9.0/tc/m_xt.c:285:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, tname, size); data/iproute2-5.9.0/tc/m_xt_old.c:318:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(tname) > 16) { data/iproute2-5.9.0/tc/m_xt_old.c:322:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). size = 1 + strlen(tname); data/iproute2-5.9.0/tc/m_xt_old.c:324:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, tname, size); data/iproute2-5.9.0/tc/tc.c:187:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(q->id, str, 15); data/iproute2-5.9.0/tc/tc_class.c:79:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_class.c:113:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k)-1); data/iproute2-5.9.0/tc/tc_class.c:123:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), TCA_KIND, k, strlen(k)+1); data/iproute2-5.9.0/tc/tc_class.c:267:22: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int cls_indent = strlen(q->id) - 2 + data/iproute2-5.9.0/tc/tc_class.c:268:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). strlen(cls_id_str); data/iproute2-5.9.0/tc/tc_class.c:279:6: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "\n"); data/iproute2-5.9.0/tc/tc_class.c:291:4: [1] (buffer) strcat: Does not check for buffer overflows when concatenating to destination [MS-banned] (CWE-120). Consider using strcat_s, strncat, strlcat, or snprintf (warning: strncat is easily misused). Risk is low because the source is a constant character. strcat(buf, "\n"); data/iproute2-5.9.0/tc/tc_class.c:402:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_exec.c:77:3: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(eu->id, name, sizeof(eu->id) - 1); data/iproute2-5.9.0/tc/tc_exec.c:100:2: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(kind, *argv, sizeof(kind) - 1); data/iproute2-5.9.0/tc/tc_filter.c:97:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_filter.c:176:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k)-1); data/iproute2-5.9.0/tc/tc_filter.c:192:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), TCA_KIND, k, strlen(k)+1); data/iproute2-5.9.0/tc/tc_filter.c:420:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_filter.c:498:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k)-1); data/iproute2-5.9.0/tc/tc_filter.c:532:48: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), TCA_KIND, k, strlen(k)+1); data/iproute2-5.9.0/tc/tc_filter.c:614:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_qdisc.c:75:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_qdisc.c:97:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(k, "clsact", sizeof(k) - 1); data/iproute2-5.9.0/tc/tc_qdisc.c:108:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). Risk is low because the source is a constant string. strncpy(k, "ingress", sizeof(k) - 1); data/iproute2-5.9.0/tc/tc_qdisc.c:140:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(k, *argv, sizeof(k)-1); data/iproute2-5.9.0/tc/tc_qdisc.c:150:47: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). addattr_l(&req.n, sizeof(req), TCA_KIND, k, strlen(k)+1); data/iproute2-5.9.0/tc/tc_qdisc.c:373:4: [1] (buffer) strncpy: Easily used incorrectly; doesn't always \0-terminate or check for invalid pointers [MS-banned] (CWE-120). strncpy(d, *argv, sizeof(d)-1); data/iproute2-5.9.0/tc/tc_util.c:288:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(p); data/iproute2-5.9.0/tc/tc_util.c:316:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). p += strlen(p); data/iproute2-5.9.0/tipc/bearer.c:144:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(r_addr) > 0) data/iproute2-5.9.0/tipc/bearer.c:219:6: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if (strlen(addr) > 0) { data/iproute2-5.9.0/tipc/misc.c:80:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(str); data/iproute2-5.9.0/tipc/misc.c:103:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(str); ANALYSIS SUMMARY: Hits = 1376 Lines analyzed = 137594 in approximately 3.51 seconds (39248 lines/second) Physical Source Lines of Code (SLOC) = 106663 Hits@level = [0] 3234 [1] 254 [2] 915 [3] 65 [4] 137 [5] 5 Hits@level+ = [0+] 4610 [1+] 1376 [2+] 1122 [3+] 207 [4+] 142 [5+] 5 Hits/KSLOC@level+ = [0+] 43.2202 [1+] 12.9004 [2+] 10.5191 [3+] 1.94069 [4+] 1.3313 [5+] 0.0468766 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.