iproute-6.7.0-1.fc40
List of Defects
Error: CLANG_WARNING: [#def1]
iproute2-6.7.0/bridge/mdb.c:262:6: warning[core.NullDereference]: Array access (from variable 'tb') results in a null pointer dereference
# 260| print_uint(PRINT_ANY, "vid", " vid %u", e->vid);
# 261|
# 262|-> if (tb[MDBA_MDB_EATTR_DST])
# 263| print_dst(tb[MDBA_MDB_EATTR_DST]);
# 264|
Error: CLANG_WARNING: [#def2]
iproute2-6.7.0/devlink/devlink.c:891:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 889| {
# 890| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 891|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 892| struct dl *dl = data;
# 893| const char *bus_name;
Error: CLANG_WARNING: [#def3]
iproute2-6.7.0/devlink/devlink.c:3152:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 3150| struct dl *dl = data;
# 3151| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 3152|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 3153|
# 3154| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CPPCHECK_WARNING (CWE-457): [#def4]
iproute2-6.7.0/devlink/devlink.c:3444: error[uninitvar]: Uninitialized variables: param_value_attr.nla_len, param_value_attr.nla_type
# 3442| nla_param[DEVLINK_ATTR_PARAM_VALUES_LIST]) {
# 3443| pr_out_entry_start(dl);
# 3444|-> pr_out_param_value(dl, nla_name, nla_type, param_value_attr);
# 3445| pr_out_entry_end(dl);
# 3446| }
Error: CLANG_WARNING: [#def5]
iproute2-6.7.0/devlink/devlink.c:3456:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 3454| static int cmd_dev_param_show_cb(const struct nlmsghdr *nlh, void *data)
# 3455| {
# 3456|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 3457| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 3458| struct dl *dl = data;
Error: CLANG_WARNING: [#def6]
iproute2-6.7.0/devlink/devlink.c:3483:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 3481| static int cmd_dev_param_set_cb(const struct nlmsghdr *nlh, void *data)
# 3482| {
# 3483|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 3484| struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {};
# 3485| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
Error: CLANG_WARNING: [#def7]
iproute2-6.7.0/devlink/devlink.c:3670:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 3668| static int cmd_port_param_show_cb(const struct nlmsghdr *nlh, void *data)
# 3669| {
# 3670|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 3671| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 3672| struct dl *dl = data;
Error: CLANG_WARNING: [#def8]
iproute2-6.7.0/devlink/devlink.c:3827:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 3825| struct dl *dl = data;
# 3826| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 3827|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 3828|
# 3829| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def9]
iproute2-6.7.0/devlink/devlink.c:3897:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 3895| static int cmd_dev_reload_cb(const struct nlmsghdr *nlh, void *data)
# 3896| {
# 3897|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 3898| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 3899| struct dl *dl = data;
Error: CLANG_WARNING: [#def10]
iproute2-6.7.0/devlink/devlink.c:4032:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 4030| static int cmd_versions_show_cb(const struct nlmsghdr *nlh, void *data)
# 4031| {
# 4032|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 4033| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 4034| bool has_versions, has_info;
Error: CLANG_WARNING: [#def11]
iproute2-6.7.0/devlink/devlink.c:4434:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 4432| {
# 4433| struct nlattr *selftests[DEVLINK_ATTR_SELFTEST_ID_MAX + 1] = {};
# 4434|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 4435| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 4436| struct dl *dl = data;
Error: CLANG_WARNING: [#def12]
iproute2-6.7.0/devlink/devlink.c:4512:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 4510| static int cmd_dev_selftests_run_cb(const struct nlmsghdr *nlh, void *data)
# 4511| {
# 4512|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 4513| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 4514| struct nlattr *selftest;
Error: CLANG_WARNING: [#def13]
iproute2-6.7.0/devlink/devlink.c:4884:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 4882| struct dl *dl = data;
# 4883| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 4884|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 4885|
# 4886| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def14]
iproute2-6.7.0/devlink/devlink.c:5025:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5023| static int cmd_port_param_set_cb(const struct nlmsghdr *nlh, void *data)
# 5024| {
# 5025|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5026| struct nlattr *nla_param[DEVLINK_ATTR_MAX + 1] = {};
# 5027| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
Error: CLANG_WARNING: [#def15]
iproute2-6.7.0/devlink/devlink.c:5312:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5310| struct dl *dl = data;
# 5311| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 5312|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5313|
# 5314| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def16]
iproute2-6.7.0/devlink/devlink.c:5346:2: warning[deadcode.DeadStores]: Value stored to 'err' is never read
# 5344| int err;
# 5345|
# 5346|-> err = dl_argv_parse_with_selector(dl, &flags, DEVLINK_CMD_RATE_GET,
# 5347| DL_OPT_HANDLEP | DL_OPT_PORT_FN_RATE_NODE_NAME,
# 5348| 0, DL_OPT_HANDLE, 0);
Error: CLANG_WARNING: [#def17]
iproute2-6.7.0/devlink/devlink.c:5428:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5426| struct dl_opts *opts = data;
# 5427| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 5428|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5429|
# 5430| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def18]
iproute2-6.7.0/devlink/devlink.c:5710:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5708| struct dl *dl = data;
# 5709| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 5710|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5711|
# 5712| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def19]
iproute2-6.7.0/devlink/devlink.c:5822:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5820| struct dl *dl = data;
# 5821| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 5822|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5823|
# 5824| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def20]
iproute2-6.7.0/devlink/devlink.c:5900:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5898| struct dl *dl = data;
# 5899| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 5900|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5901|
# 5902| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def21]
iproute2-6.7.0/devlink/devlink.c:5987:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 5985| struct dl *dl = data;
# 5986| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 5987|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 5988|
# 5989| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def22]
iproute2-6.7.0/devlink/devlink.c:6017:2: warning[deadcode.DeadStores]: Value stored to 'err' is never read
# 6015|
# 6016| pr_out_section_start(dl, "port_pool");
# 6017|-> err = mnlu_gen_socket_sndrcv(&dl->nlg, nlh, cmd_sb_port_pool_show_cb, dl);
# 6018| pr_out_section_end(dl);
# 6019| return 0;
Error: CLANG_WARNING: [#def23]
iproute2-6.7.0/devlink/devlink.c:6091:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 6089| struct dl *dl = data;
# 6090| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 6091|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 6092|
# 6093| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def24]
iproute2-6.7.0/devlink/devlink.c:6382:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 6380| struct occ_show *occ_show = data;
# 6381| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 6382|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 6383|
# 6384| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def25]
iproute2-6.7.0/devlink/devlink.c:6433:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 6431| struct occ_show *occ_show = data;
# 6432| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 6433|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 6434|
# 6435| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CPPCHECK_WARNING (CWE-457): [#def26]
iproute2-6.7.0/devlink/devlink.c:7314: error[uninitvar]: Uninitialized variables: nla_field.nla_len, nla_field.nla_type
# 7312|
# 7313| mnl_attr_for_each_nested(nla_field, nla_fields) {
# 7314|-> err = dpipe_header_field_get(nla_field, &fields[count]);
# 7315| if (err)
# 7316| return err;
Error: CPPCHECK_WARNING (CWE-457): [#def27]
iproute2-6.7.0/devlink/devlink.c:7380: error[uninitvar]: Uninitialized variables: nla_header.nla_len, nla_header.nla_type
# 7378|
# 7379| mnl_attr_for_each_nested(nla_header, nla_headers) {
# 7380|-> err = dpipe_header_get(ctx, nla_header);
# 7381| if (err)
# 7382| return err;
Error: CLANG_WARNING: [#def28]
iproute2-6.7.0/devlink/devlink.c:7391:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 7389| struct dpipe_ctx *ctx = data;
# 7390| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 7391|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 7392| int err;
# 7393|
Error: CPPCHECK_WARNING (CWE-457): [#def29]
iproute2-6.7.0/devlink/devlink.c:7539: error[uninitvar]: Uninitialized variables: nla_action.nla_len, nla_action.nla_type
# 7537| mnl_attr_for_each_nested(nla_action, nla_actions) {
# 7538| pr_out_entry_start(ctx->dl);
# 7539|-> if (dpipe_action_parse(&action, nla_action))
# 7540| goto err_action_parse;
# 7541| pr_out_dpipe_action(&action, ctx);
Error: CPPCHECK_WARNING (CWE-457): [#def30]
iproute2-6.7.0/devlink/devlink.c:7624: error[uninitvar]: Uninitialized variables: nla_match.nla_len, nla_match.nla_type
# 7622| mnl_attr_for_each_nested(nla_match, nla_matches) {
# 7623| pr_out_entry_start(ctx->dl);
# 7624|-> if (dpipe_match_parse(&match, nla_match))
# 7625| goto err_match_parse;
# 7626| pr_out_dpipe_match(&match, ctx);
Error: CPPCHECK_WARNING (CWE-457): [#def31]
iproute2-6.7.0/devlink/devlink.c:7777: error[uninitvar]: Uninitialized variables: nla_table.nla_len, nla_table.nla_type
# 7775| if (ctx->print_tables)
# 7776| pr_out_handle_start_arr(ctx->dl, tb);
# 7777|-> if (dpipe_table_show(ctx, nla_table))
# 7778| goto err_table_show;
# 7779| if (ctx->print_tables)
Error: CLANG_WARNING: [#def32]
iproute2-6.7.0/devlink/devlink.c:7794:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 7792| struct dpipe_ctx *ctx = data;
# 7793| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 7794|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 7795|
# 7796| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CPPCHECK_WARNING (CWE-457): [#def33]
iproute2-6.7.0/devlink/devlink.c:8136: error[uninitvar]: Uninitialized variables: nla_action_value.nla_len, nla_action_value.nla_type
# 8134|
# 8135| mnl_attr_for_each_nested(nla_action_value, nla_action_values) {
# 8136|-> if (dpipe_entry_action_value_show(ctx, nla_action_value))
# 8137| return -EINVAL;
# 8138| }
Error: CPPCHECK_WARNING (CWE-457): [#def34]
iproute2-6.7.0/devlink/devlink.c:8149: error[uninitvar]: Uninitialized variables: nla_match_value.nla_len, nla_match_value.nla_type
# 8147|
# 8148| mnl_attr_for_each_nested(nla_match_value, nla_match_values) {
# 8149|-> if (dpipe_entry_match_value_show(ctx, nla_match_value))
# 8150| return -EINVAL;
# 8151| }
Error: CPPCHECK_WARNING (CWE-457): [#def35]
iproute2-6.7.0/devlink/devlink.c:8207: error[uninitvar]: Uninitialized variables: nla_entry.nla_len, nla_entry.nla_type
# 8205| mnl_attr_for_each_nested(nla_entry, nla_entries) {
# 8206| pr_out_handle_start_arr(ctx->dl, tb);
# 8207|-> if (dpipe_entry_show(ctx, nla_entry))
# 8208| goto err_entry_show;
# 8209| pr_out_handle_end(ctx->dl);
Error: CLANG_WARNING: [#def36]
iproute2-6.7.0/devlink/devlink.c:8222:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 8220| struct dpipe_ctx *ctx = data;
# 8221| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 8222|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 8223|
# 8224| mnl_attr_parse(nlh, sizeof(*genl), attr_cb, tb);
Error: CLANG_WARNING: [#def37]
iproute2-6.7.0/devlink/devlink.c:8495:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 8493| struct resource_ctx *ctx = data;
# 8494| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 8495|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 8496| int err;
# 8497|
Error: CLANG_WARNING: [#def38]
iproute2-6.7.0/devlink/devlink.c:8770:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 8768| static int cmd_region_show_cb(const struct nlmsghdr *nlh, void *data)
# 8769| {
# 8770|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 8771| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 8772| struct dl *dl = data;
Error: CLANG_WARNING: [#def39]
iproute2-6.7.0/devlink/devlink.c:8827:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 8825| {
# 8826| struct nlattr *nla_entry, *nla_chunk_data, *nla_chunk_addr;
# 8827|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 8828| struct nlattr *tb_field[DEVLINK_ATTR_MAX + 1] = {};
# 8829| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
Error: CLANG_WARNING: [#def40]
iproute2-6.7.0/devlink/devlink.c:8912:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 8910| static int cmd_region_snapshot_new_cb(const struct nlmsghdr *nlh, void *data)
# 8911| {
# 8912|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 8913| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 8914| struct dl *dl = data;
Error: CLANG_WARNING: [#def41]
iproute2-6.7.0/devlink/devlink.c:9099:17: warning[unix.Malloc]: Use of memory after it is freed
# 9097| entry = list_first_entry(&fmsg_data->entry_list,
# 9098| struct nest_entry, list);
# 9099|-> *attr_value = entry->attr_type;
# 9100| list_del(&entry->list);
# 9101| free(entry);
Error: CLANG_WARNING: [#def42]
iproute2-6.7.0/devlink/devlink.c:9190:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 9188| static int cmd_fmsg_object_cb(const struct nlmsghdr *nlh, void *data)
# 9189| {
# 9190|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 9191| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 9192| struct fmsg_cb_data *fmsg_data = data;
Error: CLANG_WARNING: [#def43]
iproute2-6.7.0/devlink/devlink.c:9456:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 9454| static int cmd_health_show_cb(const struct nlmsghdr *nlh, void *data)
# 9455| {
# 9456|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 9457| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 9458| struct health_ctx *ctx = data;
Error: CPPCHECK_WARNING (CWE-457): [#def44]
iproute2-6.7.0/devlink/devlink.c:9608: error[uninitvar]: Uninitialized variables: attr_metadata.nla_len, attr_metadata.nla_type
# 9606| check_indent_newline(dl);
# 9607| print_string(PRINT_ANY, NULL, "%s",
# 9608|-> trap_metadata_name(attr_metadata));
# 9609| }
# 9610| pr_out_array_end(dl);
Error: CLANG_WARNING: [#def45]
iproute2-6.7.0/devlink/devlink.c:9639:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 9637| static int cmd_trap_show_cb(const struct nlmsghdr *nlh, void *data)
# 9638| {
# 9639|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 9640| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 9641| struct dl *dl = data;
Error: CLANG_WARNING: [#def46]
iproute2-6.7.0/devlink/devlink.c:9728:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 9726| static int cmd_trap_group_show_cb(const struct nlmsghdr *nlh, void *data)
# 9727| {
# 9728|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 9729| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 9730| struct dl *dl = data;
Error: CLANG_WARNING: [#def47]
iproute2-6.7.0/devlink/devlink.c:9822:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 9820| static int cmd_trap_policer_show_cb(const struct nlmsghdr *nlh, void *data)
# 9821| {
# 9822|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 9823| struct nlattr *tb[DEVLINK_ATTR_MAX + 1] = {};
# 9824| struct dl *dl = data;
Error: CLANG_WARNING: [#def48]
iproute2-6.7.0/devlink/mnlg.c:96:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 94| struct group_info *group_info = data;
# 95| struct nlattr *tb[CTRL_ATTR_MAX + 1] = {};
# 96|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 97|
# 98| mnl_attr_parse(nlh, sizeof(*genl), get_group_id_attr_cb, tb);
Error: CLANG_WARNING: [#def49]
iproute2-6.7.0/lib/bpf_legacy.c:40: included_from: Included from here.
iproute2-6.7.0/include/bpf_util.h:20: included_from: Included from here.
iproute2-6.7.0/include/bpf_scm.h:74:17: warning[core.NullDereference]: Access to field 'cmsg_len' results in a dereference of a null pointer (loaded from variable 'cmsg')
# 72|
# 73| cmsg = CMSG_FIRSTHDR(&msg->hdr);
# 74|-> cmsg->cmsg_len = msg->hdr.msg_controllen;
# 75| }
# 76|
Error: GCC_ANALYZER_WARNING (CWE-457): [#def50]
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘free_entries’
iproute2-6.7.0/include/list.h:9:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*n.list.next’
iproute2-6.7.0/include/list.h:54:9: note: in expansion of macro ‘container_of’
iproute2-6.7.0/include/list.h:63:9: note: in expansion of macro ‘list_entry’
iproute2-6.7.0/include/list.h:77:27: note: in expansion of macro ‘list_next_entry’
iproute2-6.7.0/tc/m_gate.c:173:9: note: in expansion of macro ‘list_for_each_entry_safe’
iproute2-6.7.0/tc/m_gate.c:201:9: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c:201:9: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘free_entries’
iproute2-6.7.0/tc/m_gate.c:173:9: note: in expansion of macro ‘list_for_each_entry_safe’
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘free_entries’
iproute2-6.7.0/include/list.h:54:9: note: in expansion of macro ‘container_of’
iproute2-6.7.0/include/list.h:63:9: note: in expansion of macro ‘list_entry’
iproute2-6.7.0/include/list.h:77:27: note: in expansion of macro ‘list_next_entry’
iproute2-6.7.0/tc/m_gate.c:173:9: note: in expansion of macro ‘list_for_each_entry_safe’
# 7|
# 8| #define container_of(ptr, type, member) ({ \
# 9|-> const typeof( ((type *)0)->member ) *__mptr = (ptr); \
# 10| (type *)( (char *)__mptr - offsetof(type,member) );})
# 11|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
iproute2-6.7.0/include/list.h:29:20: warning[-Wanalyzer-malloc-leak]: leak of ‘create_entry(mask, interval, 0)’
iproute2-6.7.0/tc/q_taprio.c: scope_hint: In function ‘taprio_parse_opt’
iproute2-6.7.0/tc/q_taprio.c:20: included_from: Included from here.
iproute2-6.7.0/tc/q_taprio.c:276:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/q_taprio.c:276:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/q_taprio.c: scope_hint: In function ‘taprio_parse_opt’
iproute2-6.7.0/tc/q_taprio.c:284:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/q_taprio.c:284:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/q_taprio.c:290:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/q_taprio.c:290:25: note: in expansion of macro ‘NEXT_ARG’
# 27| new->next = next;
# 28| new->prev = prev;
# 29|-> prev->next = new;
# 30| }
# 31|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
iproute2-6.7.0/include/list.h:29:20: warning[-Wanalyzer-malloc-leak]: leak of ‘create_gate_entry((int)gate_state, interval, ipv, maxoctets)’
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘parse_gate’
iproute2-6.7.0/tc/m_gate.c:9: included_from: Included from here.
iproute2-6.7.0/tc/m_gate.c:201:9: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c:201:9: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘parse_gate’
iproute2-6.7.0/tc/m_gate.c:269:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c:285:25: note: in expansion of macro ‘NEXT_ARG’
# 27| new->next = next;
# 28| new->prev = prev;
# 29|-> prev->next = new;
# 30| }
# 31|
Error: CLANG_WARNING: [#def53]
iproute2-6.7.0/devlink/devlink.c:36: included_from: Included from here.
iproute2-6.7.0/include/list.h:34:2: warning[unix.Malloc]: Use of memory after it is freed
# 32| static inline void list_add(struct list_head *new, struct list_head *head)
# 33| {
# 34|-> __list_add(new, head, head->next);
# 35| }
# 36|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
iproute2-6.7.0/include/list.h:108:18: warning[-Wanalyzer-malloc-leak]: leak of ‘im’
iproute2-6.7.0/lib/ll_map.c: scope_hint: In function ‘ll_entry_create’
iproute2-6.7.0/include/list.h:117:35: note: in definition of macro ‘hlist_for_each’
iproute2-6.7.0/lib/ll_map.c:68:27: note: in expansion of macro ‘container_of’
iproute2-6.7.0/include/libnetlink.h:8: included_from: Included from here.
iproute2-6.7.0/lib/ll_map.c:17: included_from: Included from here.
iproute2-6.7.0/include/uapi/linux/if_link.h:397:25: note: in expansion of macro ‘NLMSG_PAYLOAD’
iproute2-6.7.0/lib/ll_map.c:239:28: note: in expansion of macro ‘IFLA_PAYLOAD’
iproute2-6.7.0/lib/ll_map.c: scope_hint: In function ‘ll_entry_create’
iproute2-6.7.0/include/libnetlink.h:9: included_from: Included from here.
iproute2-6.7.0/lib/ll_map.c:137:15: note: in expansion of macro ‘RTA_PAYLOAD’
iproute2-6.7.0/lib/ll_map.c:138:38: note: in expansion of macro ‘RTA_OK’
iproute2-6.7.0/lib/ll_map.c: scope_hint: In function ‘ll_entry_create’
# 106| first->pprev = &n->next;
# 107| h->first = n;
# 108|-> n->pprev = &h->first;
# 109| }
# 110|
Error: CLANG_WARNING: [#def55]
iproute2-6.7.0/ip/ipaddress.c:2027:2: warning[core.StackAddressEscape]: Address of stack memory associated with local variable 'flushb' is still referred to by the global variable 'filter' upon returning to the caller. This will be a dangling reference
# 2025| fprintf(stderr, "*** Flush remains incomplete after %d rounds. ***\n", max_flush_loops);
# 2026| fflush(stderr);
# 2027|-> return 1;
# 2028| }
# 2029|
Error: CLANG_WARNING: [#def56]
iproute2-6.7.0/ip/ipaddress.c:2613:4: warning[deadcode.DeadStores]: Value stored to 'brd_len' is never read
# 2611| }
# 2612| addattr_l(&req.n, sizeof(req), IFA_BROADCAST, &brd.data, brd.bytelen);
# 2613|-> brd_len = brd.bytelen;
# 2614| }
# 2615| }
Error: CLANG_WARNING: [#def57]
iproute2-6.7.0/ip/iplink.c:497:4: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
# 495|
# 496| if (tivt.min_tx_rate == -1 || tivt.max_tx_rate == -1) {
# 497|-> ipaddr_get_vf_rate(tivt.vf, &tmin, &tmax, dev);
# 498| if (tivt.min_tx_rate == -1)
# 499| tivt.min_tx_rate = tmin;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def58]
iproute2-6.7.0/ip/iplink.c: scope_hint: In function ‘iplink_parse_vf’
iproute2-6.7.0/ip/iplink.c:497:48: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘tivt.vf’
iproute2-6.7.0/ip/iplink.c:27: included_from: Included from here.
iproute2-6.7.0/ip/iplink.c:555:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/ip/iplink.c:696:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/ip/iplink.c:696:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/ip/iplink.c:333:16: note: in expansion of macro ‘NEXT_ARG_OK’
iproute2-6.7.0/ip/iplink.c:334:17: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/ip/iplink.c:391:25: note: in expansion of macro ‘NEXT_ARG’
# 495|
# 496| if (tivt.min_tx_rate == -1 || tivt.max_tx_rate == -1) {
# 497|-> ipaddr_get_vf_rate(tivt.vf, &tmin, &tmax, dev);
# 498| if (tivt.min_tx_rate == -1)
# 499| tivt.min_tx_rate = tmin;
Error: CLANG_WARNING: [#def59]
iproute2-6.7.0/ip/iplink_bond.c:836:14: warning[deadcode.DeadStores]: Value stored to 'ifname' during its initialization is never read
# 834| struct rtattr *bondtb[LINK_XSTATS_TYPE_MAX+1];
# 835| struct rtattr *i, *list;
# 836|-> const char *ifname = "";
# 837| int rem;
# 838|
Error: CLANG_WARNING: [#def60]
iproute2-6.7.0/ip/iplink_bridge.c:888:14: warning[deadcode.DeadStores]: Value stored to 'ifname' during its initialization is never read
# 886| struct rtattr *brtb[LINK_XSTATS_TYPE_MAX+1];
# 887| struct rtattr *i, *list;
# 888|-> const char *ifname = "";
# 889| int rem;
# 890|
Error: CPPCHECK_WARNING (CWE-401): [#def61]
iproute2-6.7.0/ip/ipnetns.c:228: error[memleak]: Memory leak: c
# 226| hlist_add_head(&c->name_hash, &name_head[h]);
# 227|
# 228|-> return 0;
# 229| }
# 230|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
iproute2-6.7.0/ip/iproute_lwtunnel.c: scope_hint: In function ‘parse_encap_rpl’
iproute2-6.7.0/ip/iproute_lwtunnel.c:1066:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘parse_rpl_srh(&segbuf)’
# 1064|
# 1065| srh = parse_rpl_srh(segbuf);
# 1066|-> srhlen = (srh->hdrlen + 1) << 3;
# 1067|
# 1068| if (rta_addattr_l(rta, len, RPL_IPTUNNEL_SRH, srh,
Error: CLANG_WARNING: [#def63]
iproute2-6.7.0/ip/iproute_lwtunnel.c:1361:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 1359| if (get_u8(&lbl, *argv, 0))
# 1360| invarg("\"locator-block length\" value is invalid\n", *argv);
# 1361|-> ret = rta_addattr8(rta, len, SEG6_LOCAL_FLV_LCBLOCK_BITS, lbl);
# 1362| NEXT_ARG_FWD();
# 1363| }
Error: CLANG_WARNING: [#def64]
iproute2-6.7.0/ip/iproute_lwtunnel.c:1371:4: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 1369| if (get_u8(&nfl, *argv, 0))
# 1370| invarg("\"locator-node function length\" value is invalid\n", *argv);
# 1371|-> ret = rta_addattr8(rta, len, SEG6_LOCAL_FLV_LCNODE_FN_BITS, nfl);
# 1372| NEXT_ARG_FWD();
# 1373| }
Error: GCC_ANALYZER_WARNING (CWE-775): [#def65]
iproute2-6.7.0/ip/rtmon.c: scope_hint: In function ‘main’
iproute2-6.7.0/ip/rtmon.c:158:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
# 156| }
# 157|
# 158|-> if (rtnl_open(&rth, groups) < 0)
# 159| exit(1);
# 160|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
iproute2-6.7.0/ip/rtmon.c:158:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
# 156| }
# 157|
# 158|-> if (rtnl_open(&rth, groups) < 0)
# 159| exit(1);
# 160|
Error: GCC_ANALYZER_WARNING (CWE-775): [#def67]
iproute2-6.7.0/ip/rtmon.c:161:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(file, "w")’
# 159| exit(1);
# 160|
# 161|-> if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
# 162| perror("Cannot send dump request");
# 163| exit(1);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
iproute2-6.7.0/ip/rtmon.c:161:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(file, "w")’
# 159| exit(1);
# 160|
# 161|-> if (rtnl_linkdump_req(&rth, AF_UNSPEC) < 0) {
# 162| perror("Cannot send dump request");
# 163| exit(1);
Error: CLANG_WARNING: [#def69]
iproute2-6.7.0/ip/xfrm_policy.c:562:26: warning[core.NullDereference]: Access to field 'hard' results in a dereference of a null pointer (loaded from variable 'xpexp')
# 560| if (n->nlmsg_type == XFRM_MSG_POLEXPIRE) {
# 561| fprintf(fp, "\t");
# 562|-> fprintf(fp, "hard %u", xpexp->hard);
# 563| fprintf(fp, "%s", _SL_);
# 564| }
Error: CLANG_WARNING: [#def70]
iproute2-6.7.0/ip/xfrm_state.c:1015:26: warning[core.NullDereference]: Access to field 'hard' results in a dereference of a null pointer (loaded from variable 'xexp')
# 1013| if (n->nlmsg_type == XFRM_MSG_EXPIRE) {
# 1014| fprintf(fp, "\t");
# 1015|-> fprintf(fp, "hard %u", xexp->hard);
# 1016| fprintf(fp, "%s", _SL_);
# 1017| }
Error: CLANG_WARNING: [#def71]
iproute2-6.7.0/lib/bpf_legacy.c:1254:9: warning[unix.Malloc]: Use of memory allocated with size zero
# 1252| return -ENOMEM;
# 1253|
# 1254|-> ptr[0] = 0;
# 1255| ctx->log = ptr;
# 1256| ctx->log_size = log_size;
Error: CLANG_WARNING: [#def72]
iproute2-6.7.0/lib/bpf_legacy.c:2933:3: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 2931| bpf_hash_init(ctx, CONF_ETC_DIR "/bpf_pinning");
# 2932| if (ret == -ENOENT)
# 2933|-> ret = bpf_hash_init(ctx, CONF_USR_DIR "/bpf_pinning");
# 2934|
# 2935| return 0;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def73]
iproute2-6.7.0/lib/cg_map.c: scope_hint: In function ‘cg_id_to_path’
iproute2-6.7.0/lib/cg_map.c:47:29: warning[-Wanalyzer-malloc-leak]: leak of ‘cg_entry_create(id, get_cgroup2_path(id, 0))’
iproute2-6.7.0/include/list.h:117:35: note: in definition of macro ‘hlist_for_each’
iproute2-6.7.0/lib/cg_map.c: scope_hint: In function ‘cg_id_to_path’
iproute2-6.7.0/lib/cg_map.c: scope_hint: In function ‘cg_id_to_path’
# 45| static struct cg_cache *cg_entry_create(__u64 id, const char *path)
# 46| {
# 47|-> unsigned int h = id & (IDMAP_SIZE - 1);
# 48| struct cg_cache *cg;
# 49|
Error: CLANG_WARNING: [#def74]
iproute2-6.7.0/lib/libnetlink.c:1047:4: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 1045| }
# 1046| for (h = (struct nlmsghdr *)buf; status >= sizeof(*h); ) {
# 1047|-> int len = h->nlmsg_len;
# 1048| int l = len - sizeof(*h);
# 1049|
Error: CLANG_WARNING: [#def75]
iproute2-6.7.0/lib/mnl_utils.c:144:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 142| static int get_family_cb(const struct nlmsghdr *nlh, void *data)
# 143| {
# 144|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 145| struct nlattr *tb[CTRL_ATTR_MAX + 1] = {};
# 146| struct mnlu_gen_socket *nlg = data;
Error: CPPCHECK_WARNING (CWE-457): [#def76]
iproute2-6.7.0/lib/mnl_utils.c:303: error[uninitvar]: Uninitialized variable: attr->nla_type
# 301|
# 302| mnl_attr_for_each_nested(attr, op_policy_nest) {
# 303|-> if (ctx->cmd != (attr->nla_type & ~NLA_F_NESTED))
# 304| continue;
# 305| err = mnl_attr_parse_nested(attr, ctrl_policy_attrs_cb, tb);
Error: CLANG_WARNING: [#def77]
iproute2-6.7.0/lib/mnl_utils.c:335:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 333| static int cmd_dump_policy_cb(const struct nlmsghdr *nlh, void *data)
# 334| {
# 335|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 336| struct nlattr *tb[CTRL_ATTR_MAX + 1] = {};
# 337| struct cmd_dump_policy_ctx *ctx = data;
Error: CLANG_WARNING: [#def78]
iproute2-6.7.0/lib/rt_names.c:314:3: warning[deadcode.DeadStores]: Value stored to 'ret' is never read
# 312| ARRAY_SIZE(rtnl_addrprot_tab));
# 313| if (ret == -ENOENT)
# 314|-> ret = rtnl_tab_initialize(CONF_USR_DIR "/rt_addrprotos",
# 315| rtnl_addrprot_tab,
# 316| ARRAY_SIZE(rtnl_addrprot_tab));
Error: CLANG_WARNING: [#def79]
iproute2-6.7.0/lib/utils.c:940:10: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 938|
# 939| if (getenv("HZ"))
# 940|-> return atoi(getenv("HZ")) ? : HZ;
# 941|
# 942| if (getenv("PROC_NET_PSCHED"))
Error: CLANG_WARNING: [#def80]
iproute2-6.7.0/lib/utils.c:1727:2: warning[unix.Malloc]: Potential leak of memory pointed to by 'line'
# 1725| }
# 1726|
# 1727|-> free(line);
# 1728|
# 1729| return ret;
Error: GCC_ANALYZER_WARNING (CWE-121): [#def81]
iproute2-6.7.0/misc/ifstat.c: scope_hint: In function ‘main’
iproute2-6.7.0/misc/ifstat.c:888:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
iproute2-6.7.0/misc/ifstat.c:888:9: note: write of 1 byte to beyond the end of ‘sun’
# 886| sun.sun_family = AF_UNIX;
# 887| sun.sun_path[0] = 0;
# 888|-> sprintf(sun.sun_path+1, "ifstat%d", getuid());
# 889|
# 890| if (scan_interval > 0) {
Error: CLANG_WARNING: [#def82]
iproute2-6.7.0/misc/ifstat.c:1021:17: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1019|
# 1020| if (!no_update) {
# 1021|-> if (ftruncate(fileno(hist_fp), 0))
# 1022| perror("ifstat: ftruncate");
# 1023| rewind(hist_fp);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
iproute2-6.7.0/misc/lnstat.c: scope_hint: In function ‘main’
iproute2-6.7.0/misc/lnstat.c:297:31: warning[-Wanalyzer-malloc-leak]: leak of ‘tmp’
# 295| break;
# 296| case 'k':
# 297|-> tmp = strdup(optarg);
# 298| if (!tmp)
# 299| break;
Error: CLANG_WARNING: [#def84]
iproute2-6.7.0/misc/lnstat.c:300:13: warning[unix.Malloc]: Potential leak of memory pointed to by 'tmp'
# 298| if (!tmp)
# 299| break;
# 300|-> for (tok = strtok(tmp, ",");
# 301| tok;
# 302| tok = strtok(NULL, ",")) {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def85]
iproute2-6.7.0/misc/lnstat_util.c: scope_hint: In function ‘__lnstat_scan_fields’
iproute2-6.7.0/misc/lnstat_util.c:120:17: warning[-Wanalyzer-null-argument]: use of NULL ‘tok’ where non-null expected
<built-in>: note: argument 2 of ‘__builtin_strncpy’ must be non-null
# 118| for (i = 0; i < LNSTAT_MAX_FIELDS_PER_LINE; i++) {
# 119| lf->fields[i].file = lf;
# 120|-> strncpy(lf->fields[i].name, tok, LNSTAT_MAX_FIELD_NAME_LEN);
# 121| /* has to be null-terminate since we initialize to zero
# 122| * and field size is NAME_LEN + 1 */
Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
iproute2-6.7.0/misc/lnstat_util.c:123:23: warning[-Wanalyzer-file-leak]: leak of FILE
# 121| /* has to be null-terminate since we initialize to zero
# 122| * and field size is NAME_LEN + 1 */
# 123|-> tok = strtok(NULL, " \t\n");
# 124| if (!tok) {
# 125| lf->num_fields = i+1;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
iproute2-6.7.0/misc/lnstat_util.c:123:23: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 121| /* has to be null-terminate since we initialize to zero
# 122| * and field size is NAME_LEN + 1 */
# 123|-> tok = strtok(NULL, " \t\n");
# 124| if (!tok) {
# 125| lf->num_fields = i+1;
Error: CLANG_WARNING: [#def88]
iproute2-6.7.0/misc/nstat.c:186:10: warning[deadcode.DeadStores]: Although the value stored to 'nread' is used in the enclosing expression, the value is never actually read from 'nread'
# 184| struct nstat_ent *n;
# 185|
# 186|-> while ((nread = getline(&buf, &buflen, fp)) != -1) {
# 187| char idbuf[4096];
# 188| int off;
Error: CLANG_WARNING: [#def89]
iproute2-6.7.0/misc/nstat.c:201:23: warning[unix.cstring.BadSizeArg]: Potential buffer overflow. Replace with 'sizeof(idbuf) - strlen(idbuf) - 1' or use a safer 'strlcat' API
# 199| *p = 0;
# 200| idbuf[0] = 0;
# 201|-> strncat(idbuf, buf, sizeof(idbuf) - 1);
# 202| off = p - buf;
# 203| p += 2;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
iproute2-6.7.0/misc/nstat.c: scope_hint: In function ‘load_ugly_table’
iproute2-6.7.0/misc/nstat.c:235:20: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.7.0/misc/nstat.c: scope_hint: In function ‘load_ugly_table’
# 233| n = db;
# 234| nread = getline(&buf, &buflen, fp);
# 235|-> if (nread == -1) {
# 236| fprintf(stderr, "%s:%d: error parsing history file\n",
# 237| __FILE__, __LINE__);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
iproute2-6.7.0/misc/nstat.c:245:28: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
iproute2-6.7.0/misc/nstat.c: scope_hint: In function ‘load_ugly_table’
iproute2-6.7.0/misc/nstat.c: scope_hint: In function ‘load_ugly_table’
# 243| do {
# 244| p = strrchr(buf, ' ');
# 245|-> if (!p) {
# 246| fprintf(stderr, "%s:%d: error parsing history file\n",
# 247| __FILE__, __LINE__);
Error: CLANG_WARNING: [#def92]
iproute2-6.7.0/misc/nstat.c:260:9: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'n')
# 258| skip--;
# 259| else
# 260|-> n = n->next;
# 261| } while (p > buf + off + 2);
# 262| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def93]
iproute2-6.7.0/misc/nstat.c:260:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘n’
iproute2-6.7.0/misc/nstat.c: scope_hint: In function ‘load_ugly_table’
# 258| skip--;
# 259| else
# 260|-> n = n->next;
# 261| } while (p > buf + off + 2);
# 262| }
Error: GCC_ANALYZER_WARNING (CWE-121): [#def94]
iproute2-6.7.0/misc/nstat.c: scope_hint: In function ‘main’
iproute2-6.7.0/misc/nstat.c:639:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
iproute2-6.7.0/misc/nstat.c:639:9: note: write of 1 byte to beyond the end of ‘sun’
# 637| sun.sun_family = AF_UNIX;
# 638| sun.sun_path[0] = 0;
# 639|-> sprintf(sun.sun_path+1, "nstat%d", getuid());
# 640|
# 641| if (scan_interval > 0) {
Error: CLANG_WARNING: [#def95]
iproute2-6.7.0/misc/nstat.c:767:17: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 765| }
# 766| if (!no_update) {
# 767|-> if (ftruncate(fileno(hist_fp), 0) < 0)
# 768| perror("nstat: ftruncate");
# 769| rewind(hist_fp);
Error: GCC_ANALYZER_WARNING (CWE-121): [#def96]
iproute2-6.7.0/misc/rtacct.c: scope_hint: In function ‘main’
iproute2-6.7.0/misc/rtacct.c:498:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer overflow
iproute2-6.7.0/misc/rtacct.c:498:9: note: write of 1 byte to beyond the end of ‘sun’
# 496| sun.sun_family = AF_UNIX;
# 497| sun.sun_path[0] = 0;
# 498|-> sprintf(sun.sun_path+1, "rtacct%d", getuid());
# 499|
# 500| if (scan_interval > 0) {
Error: CLANG_WARNING: [#def97]
iproute2-6.7.0/misc/ss.c:558:3: warning[unix.Malloc]: Potential leak of memory pointed to by 'task_context'
# 556| if (!dir) {
# 557| freecon(task_context);
# 558|-> return;
# 559| }
# 560|
Error: CLANG_WARNING: [#def98]
iproute2-6.7.0/misc/ss.c:563:14: warning[unix.Malloc]: Potential leak of memory pointed to by 'sock_context'
# 561| pos_fd = strlen(path); /* $PROC_ROOT/$ID/fd/ */
# 562|
# 563|-> while ((d = readdir(dir)) != NULL) {
# 564| const char *pattern = "socket:[";
# 565| char *sock_context;
Error: CLANG_WARNING: [#def99]
iproute2-6.7.0/misc/ss.c:2370:9: warning[unix.Malloc]: Potential leak of memory pointed to by 'a.next'
# 2368| if (res)
# 2369| memcpy(res, &a, sizeof(a));
# 2370|-> return res;
# 2371| }
# 2372|
Error: CLANG_WARNING: [#def100]
iproute2-6.7.0/misc/ss.c:3539:24: warning[unix.Malloc]: Potential leak of memory pointed to by 'bc'
# 3537|
# 3538| msg = (struct msghdr) {
# 3539|-> .msg_name = (void *)&nladdr,
# 3540| .msg_namelen = sizeof(nladdr),
# 3541| .msg_iov = iov,
Error: CLANG_WARNING: [#def101]
iproute2-6.7.0/misc/ss.c:5638:8: warning[deadcode.DeadStores]: Although the value stored to 'p1' is used in the enclosing expression, the value is never actually read from 'p1'
# 5636| do_default = 0;
# 5637| }
# 5638|-> p = p1 = optarg;
# 5639| do {
# 5640| if ((p1 = strchr(p, ',')) != NULL)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def102]
iproute2-6.7.0/misc/ssfilter.tab.c: scope_hint: In function ‘yyparse’
iproute2-6.7.0/misc/ssfilter.tab.c:537:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
iproute2-6.7.0/misc/ssfilter.tab.c:522:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/misc/ssfilter.tab.c:1085:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
iproute2-6.7.0/misc/ssfilter.tab.c:522:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/misc/ssfilter.tab.c:1085:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
iproute2-6.7.0/misc/ssfilter.tab.c:522:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/misc/ssfilter.tab.c:1085:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 535| # if defined __GNUC__ && 1 < __GNUC__
# 536| # define YYCOPY(Dst, Src, Count) \
# 537|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 538| # else
# 539| # define YYCOPY(Dst, Src, Count) \
Error: GCC_ANALYZER_WARNING (CWE-457): [#def103]
iproute2-6.7.0/misc/ssfilter.tab.c:1212:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
# 1210| unconditionally makes the parser a bit smaller, and it avoids a
# 1211| GCC warning that YYVAL may be used uninitialized. */
# 1212|-> yyval = yyvsp[1-yylen];
# 1213|
# 1214|
Error: GCC_ANALYZER_WARNING (CWE-476): [#def104]
iproute2-6.7.0/netem/maketable.c: scope_hint: In function ‘inverttable’
iproute2-6.7.0/netem/maketable.c:144:28: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘inverse’
# 142| inverse = (short *)malloc(inversesize*sizeof(short));
# 143| for (i=0; i < inversesize; ++i) {
# 144|-> inverse[i] = MINSHORT;
# 145| }
# 146| for (i=0; i < tablesize; ++i) {
Error: CLANG_WARNING: [#def105]
iproute2-6.7.0/netem/normal.c:40:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '*' is a garbage value
# 38| printf("# This is the distribution table for the normal distribution.\n");
# 39| for (i = n = 0; i < TABLESIZE; i += 4) {
# 40|-> int value = (int) rint(table[i]*TABLEFACTOR);
# 41| if (value < SHRT_MIN) value = SHRT_MIN;
# 42| if (value > SHRT_MAX) value = SHRT_MAX;
Error: CLANG_WARNING: [#def106]
iproute2-6.7.0/netem/paretonormal.c:67:34: warning[core.UndefinedBinaryOperatorResult]: The left operand of '*' is a garbage value
# 65| int normvalue, parvalue, value;
# 66|
# 67|-> normvalue = (int) rint(table[i]*TABLEFACTOR);
# 68| parvalue = paretovalue(i);
# 69|
Error: CLANG_WARNING: [#def107]
iproute2-6.7.0/rdma/res-cmid.c:144:6: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
# 142| nla_line[RDMA_NLDEV_ATTR_RES_SRC_ADDR]))
# 143| goto out;
# 144|-> if (rd_is_filtered_attr(rd, "src-port", src_port,
# 145| nla_line[RDMA_NLDEV_ATTR_RES_SRC_ADDR]))
# 146| goto out;
Error: CLANG_WARNING: [#def108]
iproute2-6.7.0/rdma/res-cmid.c:155:6: warning[core.CallAndMessage]: 3rd function call argument is an uninitialized value
# 153| nla_line[RDMA_NLDEV_ATTR_RES_DST_ADDR]))
# 154| goto out;
# 155|-> if (rd_is_filtered_attr(rd, "dst-port", dst_port,
# 156| nla_line[RDMA_NLDEV_ATTR_RES_DST_ADDR]))
# 157| goto out;
Error: GCC_ANALYZER_WARNING (CWE-688): [#def109]
iproute2-6.7.0/rdma/stat.c: scope_hint: In function ‘stat_get_arg_str’
iproute2-6.7.0/rdma/stat.c:521:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘*value’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 519| if (!rd_no_arg(rd)) {
# 520| *value = strdup(rd_argv(rd));
# 521|-> len = strlen(*value);
# 522| rd_arg_inc(rd);
# 523| }
Error: GCC_ANALYZER_WARNING (CWE-688): [#def110]
iproute2-6.7.0/rdma/stat.c:521:23: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opcnts’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 519| if (!rd_no_arg(rd)) {
# 520| *value = strdup(rd_argv(rd));
# 521|-> len = strlen(*value);
# 522| rd_arg_inc(rd);
# 523| }
Error: CLANG_WARNING: [#def111]
iproute2-6.7.0/rdma/stat.c:936:8: warning[unix.Malloc]: Potential leak of memory pointed to by 'opcnts'
# 934| tb_set = mnl_attr_nest_start(rd->nlh, RDMA_NLDEV_ATTR_STAT_HWCOUNTERS);
# 935|
# 936|-> opcnt = strtok(opcnts, ",");
# 937| while (opcnt) {
# 938| found = false;
Error: GCC_ANALYZER_WARNING (CWE-401): [#def112]
iproute2-6.7.0/rdma/stat.c: scope_hint: In function ‘stat_one_unset_link_opcounters’
iproute2-6.7.0/rdma/stat.c:1013:24: warning[-Wanalyzer-malloc-leak]: leak of ‘opcnts’
# 1011| if (rd_no_arg(rd)) {
# 1012| stat_help(rd);
# 1013|-> return -EINVAL;
# 1014| }
# 1015|
Error: CLANG_WARNING: [#def113]
iproute2-6.7.0/rdma/stat.c:1016:6: warning[unix.Malloc]: Potential leak of memory pointed to by 'opcnts'
# 1014| }
# 1015|
# 1016|-> ret = stat_get_arg_str(rd, "optional-counters", &opcnts, true);
# 1017| if (ret)
# 1018| return ret;
Error: GCC_ANALYZER_WARNING (CWE-688): [#def114]
iproute2-6.7.0/rdma/utils.c: scope_hint: In function ‘get_port_from_argv’
iproute2-6.7.0/rdma/utils.c:76:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
iproute2-6.7.0/rdma/utils.c: scope_hint: In function ‘get_port_from_argv’
<built-in>: note: argument 1 of ‘__builtin_strchr’ must be non-null
# 74| *is_dump_all = strict_port ? false : true;
# 75|
# 76|-> slash = strchr(rd_argv(rd), '/');
# 77| /* if no port found, return 0 */
# 78| if (slash == NULL) {
Error: CPPCHECK_WARNING (CWE-457): [#def115]
iproute2-6.7.0/rdma/utils.c:939: error[uninitvar]: Uninitialized variables: tb_entry.nla_len, tb_entry.nla_type
# 937| cc = 0;
# 938| }
# 939|-> if (rd_attr_check(tb_entry, &type) != MNL_CB_OK)
# 940| return;
# 941| if (!key) {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def116]
iproute2-6.7.0/tc/em_canid.c: scope_hint: In function ‘canid_parse_rule’
iproute2-6.7.0/tc/em_canid.c:77:51: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rules.rules_raw’
iproute2-6.7.0/tc/em_canid.c:27: included_from: Included from here.
iproute2-6.7.0/tc/em_canid.c: scope_hint: In function ‘canid_parse_rule’
# 75| }
# 76|
# 77|-> rules->rules_raw[rules->rules_cnt].can_id =
# 78| can_id | ((iseff) ? CAN_EFF_FLAG : 0);
# 79| rules->rules_raw[rules->rules_cnt].can_mask =
Error: CLANG_WARNING: [#def117]
iproute2-6.7.0/tc/em_meta.c:158:32: warning[core.NullDereference]: Access to field 'data' results in a dereference of a null pointer (loaded from variable 'a')
# 156| struct bstr *a = (struct bstr *) val;
# 157|
# 158|-> addattr_l(n, MAX_MSG, tlv, a->data, a->len);
# 159| }
# 160| break;
Error: CPPCHECK_WARNING (CWE-401): [#def118]
iproute2-6.7.0/tc/emp_ematch.l:47: error[memleakOnRealloc]: Common realloc mistake: 'strbuf' nulled but not freed upon failure
# 45| {
# 46| strbuf_size += 512;
# 47|-> strbuf = realloc(strbuf, strbuf_size);
# 48| }
# 49|
Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘yy_get_next_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:1457:18: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
iproute2-6.7.0/tc/emp_ematch.lex.c:1459:41: note: in expansion of macro ‘yyrealloc’
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘yy_get_next_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:1459:41: note: in expansion of macro ‘yyrealloc’
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘yy_get_next_buffer’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘ematch__create_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:1779:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
iproute2-6.7.0/tc/emp_ematch.lex.c:1765:21: note: in expansion of macro ‘yy_create_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:1769:24: note: in expansion of macro ‘yyalloc’
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘ematch__create_buffer’
Error: CPPCHECK_WARNING (CWE-476): [#def121]
iproute2-6.7.0/tc/emp_ematch.lex.c:1819: warning[nullPointer]: Possible null pointer dereference: b
Error: CPPCHECK_WARNING (CWE-476): [#def122]
iproute2-6.7.0/tc/emp_ematch.lex.c:1820: warning[nullPointer]: Possible null pointer dereference: b
Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘ematch__scan_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:2033:25: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
iproute2-6.7.0/tc/emp_ematch.lex.c:2017:17: note: in expansion of macro ‘yy_scan_bytes’
iproute2-6.7.0/tc/emp_ematch.lex.c:2026:24: note: in expansion of macro ‘yyalloc’
iproute2-6.7.0/tc/emp_ematch.lex.c: scope_hint: In function ‘ematch__scan_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:2035:6: note: in expansion of macro ‘yy_scan_buffer’
iproute2-6.7.0/tc/emp_ematch.lex.c:1967:17: note: in expansion of macro ‘yy_scan_buffer’
Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
iproute2-6.7.0/tc/emp_ematch.tab.c: scope_hint: In function ‘ematch_parse’
iproute2-6.7.0/tc/emp_ematch.tab.c:390:21: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
iproute2-6.7.0/tc/emp_ematch.tab.c:93:40: note: in definition of macro ‘YY_CAST’
iproute2-6.7.0/tc/emp_ematch.tab.c:376:25: note: in expansion of macro ‘YYMALLOC’
iproute2-6.7.0/tc/emp_ematch.tab.c:958:20: note: in expansion of macro ‘YYSTACK_ALLOC’
iproute2-6.7.0/tc/emp_ematch.tab.c:680:7: note: in expansion of macro ‘yydebug’
iproute2-6.7.0/tc/emp_ematch.tab.c:1006:7: note: in expansion of macro ‘YYDPRINTF’
iproute2-6.7.0/tc/emp_ematch.tab.c:1028:17: note: in expansion of macro ‘YYTRANSLATE’
iproute2-6.7.0/tc/emp_ematch.tab.c:689:7: note: in expansion of macro ‘yydebug’
iproute2-6.7.0/tc/emp_ematch.tab.c:1052:3: note: in expansion of macro ‘YY_SYMBOL_PRINT’
iproute2-6.7.0/tc/emp_ematch.tab.c:93:40: note: in definition of macro ‘YY_CAST’
iproute2-6.7.0/tc/emp_ematch.tab.c:376:25: note: in expansion of macro ‘YYMALLOC’
iproute2-6.7.0/tc/emp_ematch.tab.c:958:20: note: in expansion of macro ‘YYSTACK_ALLOC’
iproute2-6.7.0/tc/emp_ematch.tab.c:435:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/tc/emp_ematch.tab.c:961:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
iproute2-6.7.0/tc/emp_ematch.tab.c:680:7: note: in expansion of macro ‘yydebug’
iproute2-6.7.0/tc/emp_ematch.tab.c:1006:7: note: in expansion of macro ‘YYDPRINTF’
iproute2-6.7.0/tc/emp_ematch.tab.c:689:7: note: in expansion of macro ‘yydebug’
iproute2-6.7.0/tc/emp_ematch.tab.c:1052:3: note: in expansion of macro ‘YY_SYMBOL_PRINT’
iproute2-6.7.0/tc/emp_ematch.tab.c:917:3: note: in expansion of macro ‘YY_STACK_PRINT’
iproute2-6.7.0/tc/emp_ematch.tab.c:93:40: note: in definition of macro ‘YY_CAST’
iproute2-6.7.0/tc/emp_ematch.tab.c:376:25: note: in expansion of macro ‘YYMALLOC’
iproute2-6.7.0/tc/emp_ematch.tab.c:958:20: note: in expansion of macro ‘YYSTACK_ALLOC’
# 388| # endif
# 389| # ifndef YYMALLOC
# 390|-> # define YYMALLOC malloc
# 391| # if ! defined malloc && ! defined EXIT_SUCCESS
# 392| void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
Error: GCC_ANALYZER_WARNING (CWE-457): [#def125]
iproute2-6.7.0/tc/emp_ematch.tab.c:450:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
iproute2-6.7.0/tc/emp_ematch.tab.c:435:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/tc/emp_ematch.tab.c:961:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
iproute2-6.7.0/tc/emp_ematch.tab.c:435:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/tc/emp_ematch.tab.c:961:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
iproute2-6.7.0/tc/emp_ematch.tab.c:435:9: note: in expansion of macro ‘YYCOPY’
iproute2-6.7.0/tc/emp_ematch.tab.c:961:9: note: in expansion of macro ‘YYSTACK_RELOCATE’
# 448| # if defined __GNUC__ && 1 < __GNUC__
# 449| # define YYCOPY(Dst, Src, Count) \
# 450|-> __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
# 451| # else
# 452| # define YYCOPY(Dst, Src, Count) \
Error: GCC_ANALYZER_WARNING (CWE-124): [#def126]
iproute2-6.7.0/tc/f_flower.c: scope_hint: In function ‘flower_parse_enc_opts_geneve’
iproute2-6.7.0/tc/f_flower.c:1240:26: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
iproute2-6.7.0/tc/f_flower.c:21: included_from: Included from here.
iproute2-6.7.0/tc/f_flower.c:2126:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/f_flower.c:2126:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/f_flower.c:1240:26: note: valid subscripts for ‘key’ are ‘[0]’ to ‘[65535]’
# 1238| token = strsep(&str, ",");
# 1239| }
# 1240|-> key[key_len - 1] = '\0';
# 1241| mask[mask_len - 1] = '\0';
# 1242|
Error: GCC_ANALYZER_WARNING (CWE-124): [#def127]
iproute2-6.7.0/tc/f_flower.c:1241:28: warning[-Wanalyzer-out-of-bounds]: stack-based buffer underwrite
iproute2-6.7.0/tc/f_flower.c:2126:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/f_flower.c:2126:25: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/f_flower.c:1241:28: note: valid subscripts for ‘mask’ are ‘[0]’ to ‘[65535]’
# 1239| }
# 1240| key[key_len - 1] = '\0';
# 1241|-> mask[mask_len - 1] = '\0';
# 1242|
# 1243| nest = addattr_nest(n, MAX_MSG, TCA_FLOWER_KEY_ENC_OPTS);
Error: CLANG_WARNING: [#def128]
iproute2-6.7.0/tc/m_action.c:226:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 224| memset(k, 0, sizeof(k));
# 225|
# 226|-> if (strcmp(*argv, "action") == 0) {
# 227| argc--;
# 228| argv++;
Error: GCC_ANALYZER_WARNING (CWE-590): [#def129]
iproute2-6.7.0/tc/m_gate.c:175:17: warning[-Wanalyzer-free-of-non-heap]: ‘free’ of ‘e’ which points to memory on the stack
iproute2-6.7.0/tc/m_gate.c:201:9: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c:201:9: note: in expansion of macro ‘NEXT_ARG’
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘free_entries’
iproute2-6.7.0/tc/m_gate.c:173:9: note: in expansion of macro ‘list_for_each_entry_safe’
iproute2-6.7.0/tc/m_gate.c: scope_hint: In function ‘free_entries’
# 173| list_for_each_entry_safe(e, n, gate_entries, list) {
# 174| list_del(&e->list);
# 175|-> free(e);
# 176| }
# 177| }
Error: CLANG_WARNING: [#def130]
iproute2-6.7.0/tc/m_ife.c:294:3: warning[deadcode.DeadStores]: Value stored to 'has_optional' is never read
# 292|
# 293| if (tb[TCA_IFE_DMAC]) {
# 294|-> has_optional = 1;
# 295| print_string(PRINT_ANY, "dst", "dst %s ",
# 296| ll_addr_n2a(RTA_DATA(tb[TCA_IFE_DMAC]),
Error: CLANG_WARNING: [#def131]
iproute2-6.7.0/tc/m_ife.c:302:3: warning[deadcode.DeadStores]: Value stored to 'has_optional' is never read
# 300|
# 301| if (tb[TCA_IFE_SMAC]) {
# 302|-> has_optional = 1;
# 303| print_string(PRINT_ANY, "src", "src %s ",
# 304| ll_addr_n2a(RTA_DATA(tb[TCA_IFE_SMAC]),
Error: CLANG_WARNING: [#def132]
iproute2-6.7.0/tc/m_skbmod.c:193:3: warning[deadcode.DeadStores]: Value stored to 'has_optional' is never read
# 191|
# 192| if (tb[TCA_SKBMOD_DMAC]) {
# 193|-> has_optional = 1;
# 194| fprintf(f, "set dmac %s ",
# 195| ll_addr_n2a(RTA_DATA(tb[TCA_SKBMOD_DMAC]),
Error: CLANG_WARNING: [#def133]
iproute2-6.7.0/tc/m_skbmod.c:202:3: warning[deadcode.DeadStores]: Value stored to 'has_optional' is never read
# 200|
# 201| if (tb[TCA_SKBMOD_SMAC]) {
# 202|-> has_optional = 1;
# 203| fprintf(f, "set smac %s ",
# 204| ll_addr_n2a(RTA_DATA(tb[TCA_SKBMOD_SMAC]),
Error: CLANG_WARNING: [#def134]
iproute2-6.7.0/tc/q_netem.c:503:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'slot_dist_data'
# 501| NEXT_ARG();
# 502| if (get_time64(&slot.dist_delay, *argv)) {
# 503|-> explain1("slot delay");
# 504| return -1;
# 505| }
Error: CPPCHECK_WARNING (CWE-401): [#def135]
iproute2-6.7.0/tc/tc_class.c:174: error[memleak]: Memory leak: node
# 172| else
# 173| hlist_add_head(&node->hlist, &cls_list);
# 174|-> }
# 175|
# 176| static void graph_indent(char *buf, struct graph_node *node, int is_newline,
Error: CLANG_WARNING: [#def136]
iproute2-6.7.0/tipc/bearer.c:81:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 79| static int get_netid_cb(const struct nlmsghdr *nlh, void *data)
# 80| {
# 81|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 82| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 83| struct nlattr *attrs[TIPC_NLA_NET_MAX + 1] = {};
Error: CLANG_WARNING: [#def137]
iproute2-6.7.0/tipc/bearer.c:440:8: warning[deadcode.DeadStores]: Although the value stored to 'opt' is used in the enclosing expression, the value is never actually read from 'opt'
# 438| return -EINVAL;
# 439| }
# 440|-> if (!(opt = get_opt(opts, "name"))) {
# 441| fprintf(stderr, "error, missing media name\n");
# 442| return -EINVAL;
Error: CLANG_WARNING: [#def138]
iproute2-6.7.0/tipc/bearer.c:752:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 750| {
# 751| struct sockaddr_storage *addr;
# 752|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 753| struct nlattr *info[TIPC_NLA_UDP_MAX + 1] = {};
# 754|
Error: CLANG_WARNING: [#def139]
iproute2-6.7.0/tipc/bearer.c:788:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 786| struct cb_data *cb_data = (struct cb_data *) data;
# 787| struct sockaddr_storage *addr;
# 788|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 789| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 790| struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {};
Error: CLANG_WARNING: [#def140]
iproute2-6.7.0/tipc/bearer.c:885:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 883| {
# 884| int *prop = data;
# 885|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 886| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 887| struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {};
Error: CLANG_WARNING: [#def141]
iproute2-6.7.0/tipc/bearer.c:948:8: warning[deadcode.DeadStores]: Although the value stored to 'opt' is used in the enclosing expression, the value is never actually read from 'opt'
# 946| return -EINVAL;
# 947| }
# 948|-> if (!(opt = get_opt(opts, "name"))) {
# 949| fprintf(stderr, "error, missing media name\n");
# 950| return -EINVAL;
Error: CLANG_WARNING: [#def142]
iproute2-6.7.0/tipc/bearer.c:1068:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 1066| static int bearer_list_cb(const struct nlmsghdr *nlh, void *data)
# 1067| {
# 1068|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 1069| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 1070| struct nlattr *attrs[TIPC_NLA_BEARER_MAX + 1] = {};
Error: CLANG_WARNING: [#def143]
iproute2-6.7.0/tipc/link.c:34:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 32| static int link_list_cb(const struct nlmsghdr *nlh, void *data)
# 33| {
# 34|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 35| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 36| struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
Error: CLANG_WARNING: [#def144]
iproute2-6.7.0/tipc/link.c:84:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 82| {
# 83| int *prop = data;
# 84|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 85| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 86| struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
Error: CLANG_WARNING: [#def145]
iproute2-6.7.0/tipc/link.c:182:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 180| int *prop = data;
# 181| int prop_ratio = TIPC_NLA_PROP_BROADCAST_RATIO;
# 182|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 183| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 184| struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
Error: CLANG_WARNING: [#def146]
iproute2-6.7.0/tipc/link.c:503:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 501| const char *name;
# 502| const char *link = data;
# 503|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 504| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 505| struct nlattr *attrs[TIPC_NLA_LINK_MAX + 1] = {};
Error: CLANG_WARNING: [#def147]
iproute2-6.7.0/tipc/link.c:805:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 803| static int link_mon_summary_cb(const struct nlmsghdr *nlh, void *data)
# 804| {
# 805|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 806| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 807| struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
Error: CLANG_WARNING: [#def148]
iproute2-6.7.0/tipc/link.c:937:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 935| static int link_mon_peer_list_cb(const struct nlmsghdr *nlh, void *data)
# 936| {
# 937|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 938| struct nlattr *attrs[TIPC_NLA_MON_PEER_MAX + 1] = {};
# 939| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
Error: CLANG_WARNING: [#def149]
iproute2-6.7.0/tipc/link.c:1023:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 1021| static int link_mon_list_cb(const struct nlmsghdr *nlh, void *data)
# 1022| {
# 1023|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 1024| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 1025| struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
Error: CLANG_WARNING: [#def150]
iproute2-6.7.0/tipc/link.c:1151:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 1149| static int link_mon_get_cb(const struct nlmsghdr *nlh, void *data)
# 1150| {
# 1151|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 1152| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 1153| struct nlattr *attrs[TIPC_NLA_MON_MAX + 1] = {};
Error: CLANG_WARNING: [#def151]
iproute2-6.7.0/tipc/media.c:22:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 20| static int media_list_cb(const struct nlmsghdr *nlh, void *data)
# 21| {
# 22|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 23| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 24| struct nlattr *attrs[TIPC_NLA_MEDIA_MAX + 1] = {};
Error: CLANG_WARNING: [#def152]
iproute2-6.7.0/tipc/media.c:59:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 57| {
# 58| int *prop = data;
# 59|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 60| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 61| struct nlattr *attrs[TIPC_NLA_MEDIA_MAX + 1] = {};
Error: CLANG_WARNING: [#def153]
iproute2-6.7.0/tipc/nametable.c:26:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 24| {
# 25| int *iteration = data;
# 26|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 27| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 28| struct nlattr *attrs[TIPC_NLA_NAME_TABLE_MAX + 1] = {};
Error: CLANG_WARNING: [#def154]
iproute2-6.7.0/tipc/node.c:116:2: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
# 114| close(sk);
# 115|
# 116|-> printf("%08x\n", addr.addr.id.node);
# 117| return 0;
# 118| }
Error: CLANG_WARNING: [#def155]
iproute2-6.7.0/tipc/socket.c:25:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 23| static int publ_list_cb(const struct nlmsghdr *nlh, void *data)
# 24| {
# 25|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 26| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 27| struct nlattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {};
Error: CLANG_WARNING: [#def156]
iproute2-6.7.0/tipc/socket.c:74:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 72| static int sock_list_cb(const struct nlmsghdr *nlh, void *data)
# 73| {
# 74|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 75| struct nlattr *info[TIPC_NLA_MAX + 1] = {};
# 76| struct nlattr *attrs[TIPC_NLA_SOCK_MAX + 1] = {};
Error: CLANG_WARNING: [#def157]
iproute2-6.7.0/vdpa/vdpa.c:591:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 589| static int cmd_mgmtdev_show_cb(const struct nlmsghdr *nlh, void *data)
# 590| {
# 591|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 592| struct nlattr *tb[VDPA_ATTR_MAX + 1] = {};
# 593| struct vdpa *vdpa = data;
Error: CLANG_WARNING: [#def158]
iproute2-6.7.0/vdpa/vdpa.c:694:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 692| static int cmd_dev_show_cb(const struct nlmsghdr *nlh, void *data)
# 693| {
# 694|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 695| struct nlattr *tb[VDPA_ATTR_MAX + 1] = {};
# 696| struct vdpa *vdpa = data;
Error: CLANG_WARNING: [#def159]
iproute2-6.7.0/vdpa/vdpa.c:821:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 819| static int cmd_dev_config_show_cb(const struct nlmsghdr *nlh, void *data)
# 820| {
# 821|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 822| struct nlattr *tb[VDPA_ATTR_MAX + 1] = {};
# 823| struct vdpa *vdpa = data;
Error: CPPCHECK_WARNING (CWE-457): [#def160]
iproute2-6.7.0/vdpa/vdpa.c:910: error[uninitvar]: Uninitialized variable: attr->nla_type
# 908|
# 909| mnl_attr_for_each(attr, nlh, sizeof(struct genlmsghdr)) {
# 910|-> switch (attr->nla_type) {
# 911| case VDPA_ATTR_DEV_NET_CFG_MAX_VQP:
# 912| max_vqp = mnl_attr_get_u16(attr);
Error: CLANG_WARNING: [#def161]
iproute2-6.7.0/vdpa/vdpa.c:953:21: warning[deadcode.DeadStores]: Value stored to 'genl' during its initialization is never read
# 951| static int cmd_dev_vstats_show_cb(const struct nlmsghdr *nlh, void *data)
# 952| {
# 953|-> struct genlmsghdr *genl = mnl_nlmsg_get_payload(nlh);
# 954| struct nlattr *tb[VDPA_ATTR_MAX + 1] = {};
# 955| struct vdpa *vdpa = data;
Scan Properties
analyzer-version-clang | 18.1.3 |
analyzer-version-cppcheck | 2.13.0 |
analyzer-version-gcc | 14.0.1 |
analyzer-version-gcc-analyzer | 14.0.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-121.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | iproute-6.7.0-1.fc40 |
store-results-to | /tmp/tmpxp1wwoiv/iproute-6.7.0-1.fc40.tar.xz |
time-created | 2024-04-22 10:59:38 |
time-finished | 2024-04-22 11:04:16 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpxp1wwoiv/iproute-6.7.0-1.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpxp1wwoiv/iproute-6.7.0-1.fc40.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |