Task #132049 - ndctl-85-2.fc45/scan-results.err
back to task #132049download
Error: GCC_ANALYZER_WARNING (CWE-415):
ndctl-85/cxl/lib/libcxl.c:3754:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*cmd.query_cmd’
ndctl-85/cxl/lib/libcxl.c:5070:28: enter_function: entry to ‘cxl_cmd_new_set_alert_config’
ndctl-85/cxl/lib/libcxl.c:5072:16: call_function: calling ‘cxl_cmd_new_generic’ from ‘cxl_cmd_new_set_alert_config’
# 3752| return;
# 3753| if (--cmd->refcount == 0) {
# 3754|-> free(cmd->query_cmd);
# 3755| free(cmd->send_cmd);
# 3756| free(cmd->input_payload);
Error: GCC_ANALYZER_WARNING (CWE-476):
ndctl-85/cxl/lib/libcxl.c:4756:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
ndctl-85/cxl/lib/libcxl.c:4747:28: enter_function: entry to ‘cxl_cmd_new_set_partition’
ndctl-85/cxl/lib/libcxl.c:4753:15: call_function: calling ‘cxl_cmd_new_generic’ from ‘cxl_cmd_new_set_partition’
ndctl-85/cxl/lib/libcxl.c:4753:15: return_function: returning to ‘cxl_cmd_new_set_partition’ from ‘cxl_cmd_new_generic’
ndctl-85/cxl/lib/libcxl.c:4756:9: danger: dereference of NULL ‘cxl_cmd_new_generic(memdev, 9)’
# 4754| CXL_MEM_COMMAND_ID_SET_PARTITION_INFO);
# 4755|
# 4756|-> setpart = cmd->input_payload;
# 4757| setpart->volatile_size = cpu_to_le64(volatile_size)
# 4758| / CXL_CAPACITY_MULTIPLIER;
Error: GCC_ANALYZER_WARNING (CWE-775):
ndctl-85/cxl/memdev.c:1005:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘actx.f_in’
ndctl-85/cxl/memdev.c:1231:5: enter_function: entry to ‘cmd_wait_sanitize’
ndctl-85/cxl/memdev.c:1233:21: call_function: calling ‘memdev_action’ from ‘cmd_wait_sanitize’
# 1003| if (err == argc) {
# 1004| usage_with_options(u, options);
# 1005|-> return -EINVAL;
# 1006| }
# 1007|
Error: GCC_ANALYZER_WARNING (CWE-775):
ndctl-85/cxl/memdev.c:1005:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘actx.f_out’
ndctl-85/cxl/memdev.c:1231:5: enter_function: entry to ‘cmd_wait_sanitize’
ndctl-85/cxl/memdev.c:1233:21: call_function: calling ‘memdev_action’ from ‘cmd_wait_sanitize’
# 1003| if (err == argc) {
# 1004| usage_with_options(u, options);
# 1005|-> return -EINVAL;
# 1006| }
# 1007|
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/cxl/memdev.c:1005:24: warning[-Wanalyzer-malloc-leak]: leak of ‘actx.f_in’
ndctl-85/cxl/memdev.c:1231:5: enter_function: entry to ‘cmd_wait_sanitize’
ndctl-85/cxl/memdev.c:1233:21: call_function: calling ‘memdev_action’ from ‘cmd_wait_sanitize’
# 1003| if (err == argc) {
# 1004| usage_with_options(u, options);
# 1005|-> return -EINVAL;
# 1006| }
# 1007|
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/cxl/memdev.c:1005:24: warning[-Wanalyzer-malloc-leak]: leak of ‘actx.f_out’
ndctl-85/cxl/memdev.c:1231:5: enter_function: entry to ‘cmd_wait_sanitize’
ndctl-85/cxl/memdev.c:1233:21: call_function: calling ‘memdev_action’ from ‘cmd_wait_sanitize’
# 1003| if (err == argc) {
# 1004| usage_with_options(u, options);
# 1005|-> return -EINVAL;
# 1006| }
# 1007|
Error: GCC_ANALYZER_WARNING (CWE-416):
ndctl-85/daxctl/acpi.c:48:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘_e’
ndctl-85/daxctl/acpi.c:754:12: enter_function: entry to ‘do_split’
ndctl-85/daxctl/acpi.c:757:18: call_function: calling ‘split_srat’ from ‘do_split’
# 46| return;
# 47|
# 48|-> list_for_each_safe(&container->ents, ent, _e, list) {
# 49| list_del_from(&container->ents, &ent->list);
# 50| free(ent);
Error: GCC_ANALYZER_WARNING (CWE-416):
ndctl-85/daxctl/acpi.c:63:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘_e’
ndctl-85/daxctl/acpi.c:611:12: enter_function: entry to ‘split_nfit’
ndctl-85/daxctl/acpi.c:615:39: call_function: calling ‘read_nfit’ from ‘split_nfit’
# 61| return;
# 62|
# 63|-> list_for_each_safe(&container->ents, ent, _e, list) {
# 64| list_del_from(&container->ents, &ent->list);
# 65| free(ent);
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/daxctl/acpi.c:141:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ent’
ndctl-85/daxctl/acpi.c:611:12: enter_function: entry to ‘split_nfit’
ndctl-85/daxctl/acpi.c:615:39: call_function: calling ‘read_nfit’ from ‘split_nfit’
# 139| return NULL;
# 140|
# 141|-> container = calloc(1, sizeof(*container));
# 142| if (!container) {
# 143| error("failed to alloc %d bytes\n", nfit->h.length);
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/daxctl/acpi.c:159:40: warning[-Wanalyzer-malloc-leak]: leak of ‘ent’
ndctl-85/daxctl/acpi.c:611:12: enter_function: entry to ‘split_nfit’
ndctl-85/daxctl/acpi.c:615:39: call_function: calling ‘read_nfit’ from ‘split_nfit’
# 157| buf = nfit + 1;
# 158| while (length) {
# 159|-> struct nfit_ent *ent = calloc(1, sizeof(*ent));
# 160|
# 161| if (!ent) {
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/daxctl/acpi.c:200:21: warning[-Wanalyzer-malloc-leak]: leak of ‘ent’
ndctl-85/daxctl/acpi.c:754:12: enter_function: entry to ‘do_split’
ndctl-85/daxctl/acpi.c:757:18: call_function: calling ‘split_srat’ from ‘do_split’
# 198| return NULL;
# 199|
# 200|-> container = calloc(1, sizeof(*container));
# 201| if (!container) {
# 202| error("failed to alloc %d bytes\n", srat->h.length);
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/daxctl/acpi.c:218:40: warning[-Wanalyzer-malloc-leak]: leak of ‘ent’
ndctl-85/daxctl/acpi.c:376:12: enter_function: entry to ‘split_srat’
ndctl-85/daxctl/acpi.c:378:39: call_function: calling ‘read_srat’ from ‘split_srat’
# 216| buf = srat + 1;
# 217| while (length) {
# 218|-> struct srat_ent *ent = calloc(1, sizeof(*ent));
# 219|
# 220| if (!ent) {
Error: GCC_ANALYZER_WARNING (CWE-775):
ndctl-85/ndctl/dimm.c:1328:24: warning[-Wanalyzer-file-leak]: leak of FILE ‘actx.f_out’
ndctl-85/ndctl/dimm.c:1629:5: enter_function: entry to ‘cmd_wait_overwrite’
ndctl-85/ndctl/dimm.c:1631:21: call_function: calling ‘dimm_action’ from ‘cmd_wait_overwrite’
# 1326| if (err == argc) {
# 1327| usage_with_options(u, options);
# 1328|-> return -EINVAL;
# 1329| }
# 1330|
Error: GCC_ANALYZER_WARNING (CWE-401):
ndctl-85/ndctl/dimm.c:1328:24: warning[-Wanalyzer-malloc-leak]: leak of ‘actx.f_out’
ndctl-85/ndctl/dimm.c:1629:5: enter_function: entry to ‘cmd_wait_overwrite’
ndctl-85/ndctl/dimm.c:1631:21: call_function: calling ‘dimm_action’ from ‘cmd_wait_overwrite’
# 1326| if (err == argc) {
# 1327| usage_with_options(u, options);
# 1328|-> return -EINVAL;
# 1329| }
# 1330|
Error: GCC_ANALYZER_WARNING (CWE-476):
ndctl-85/ndctl/lib/libndctl.c:5634:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘dax’
ndctl-85/ndctl/lib/libndctl.c:5627:33: acquire_memory: this call could return NULL
ndctl-85/ndctl/lib/libndctl.c:5631:12: branch_false: following ‘false’ branch (when ‘dax’ is non-NULL)...
ndctl-85/ndctl/lib/libndctl.c:5634:9: branch_false: ...to here
ndctl-85/ndctl/lib/libndctl.c:5634:9: danger: ‘dax’ could be NULL: unchecked value from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 5632| return NULL;
# 5633|
# 5634|-> pfn->id = id;
# 5635| pfn->region = region;
# 5636| if (!__add_pfn(pfn, dax_base)) {
Error: GCC_ANALYZER_WARNING (CWE-688):
ndctl-85/ndctl/load-keys.c:187:14: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘keypath’ where non-null expected
ndctl-85/ndctl/load-keys.c:232:5: enter_function: entry to ‘cmd_load_keys’
ndctl-85/ndctl/load-keys.c:250:12: branch_false: following ‘false’ branch...
ndctl-85/ndctl/load-keys.c:253:14: branch_false: ...to here
ndctl-85/ndctl/load-keys.c:253:12: branch_true: following ‘true’ branch...
ndctl-85/ndctl/load-keys.c:254:34: branch_true: ...to here
ndctl-85/ndctl/load-keys.c:254:34: acquire_memory: this call could return NULL
ndctl-85/ndctl/load-keys.c:256:16: call_function: calling ‘load_keys’ from ‘cmd_load_keys’
# 185| int rc;
# 186|
# 187|-> rc = chdir(keypath);
# 188| if (rc < 0) {
# 189| fprintf(stderr, "Change current work dir to %s failed: %s\n",
Error: COMPILER_WARNING:
ndctl-85/util/parse-configs.c:7:10: error[fatal error]: iniparser.h: No such file or directory
# 5| #include <errno.h>
# 6| #include <fcntl.h>
# 7|-> #include <iniparser.h>
# 8| #include <sys/stat.h>
# 9| #include <util/parse-configs.h>
Error: GCC_ANALYZER_WARNING (CWE-688):
ndctl-85/util/parse-options.c:151:38: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
ndctl-85/util/parse-options.c:530:5: enter_function: entry to ‘parse_options’
ndctl-85/util/parse-options.c:533:16: call_function: calling ‘parse_options_subcommand_prefix’ from ‘parse_options’
# 149| if (get_arg(p, opt, flags, &arg))
# 150| return -1;
# 151|-> *(int *)opt->value = strtol(arg, (char **)&s, 10);
# 152| if (*s)
# 153| return opterror(opt, "expects a numerical value", flags);
Error: GCC_ANALYZER_WARNING (CWE-688):
ndctl-85/util/parse-options.c:167:47: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
ndctl-85/util/parse-options.c:530:5: enter_function: entry to ‘parse_options’
ndctl-85/util/parse-options.c:533:16: call_function: calling ‘parse_options_subcommand_prefix’ from ‘parse_options’
# 165| if (get_arg(p, opt, flags, &arg))
# 166| return -1;
# 167|-> *(unsigned int *)opt->value = strtol(arg, (char **)&s, 10);
# 168| if (*s)
# 169| return opterror(opt, "expects a numerical value", flags);
Error: GCC_ANALYZER_WARNING (CWE-688):
ndctl-85/util/parse-options.c:183:39: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
ndctl-85/util/parse-options.c:530:5: enter_function: entry to ‘parse_options’
ndctl-85/util/parse-options.c:533:16: call_function: calling ‘parse_options_subcommand_prefix’ from ‘parse_options’
# 181| if (get_arg(p, opt, flags, &arg))
# 182| return -1;
# 183|-> *(long *)opt->value = strtol(arg, (char **)&s, 10);
# 184| if (*s)
# 185| return opterror(opt, "expects a numerical value", flags);
Error: GCC_ANALYZER_WARNING (CWE-688):
ndctl-85/util/parse-options.c:199:43: warning[-Wanalyzer-null-argument]: use of NULL ‘arg’ where non-null expected
ndctl-85/util/parse-options.c:530:5: enter_function: entry to ‘parse_options’
ndctl-85/util/parse-options.c:533:16: call_function: calling ‘parse_options_subcommand_prefix’ from ‘parse_options’
# 197| if (get_arg(p, opt, flags, &arg))
# 198| return -1;
# 199|-> *(uint64_t *)opt->value = strtoull(arg, (char **)&s, 10);
# 200| if (*s)
# 201| return opterror(opt, "expects a numerical value", flags);