Task #34118 - added.err

back to task #34118
download
Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c:462:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_44->context.state_root,  err)'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'store_seccomp_cache'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY'
#  460|   
#  461|     ret = libcrun_get_state_directory (&dir, state_root, NULL, err);
#  462|->   if (UNLIKELY (ret < 0))
#  463|       return ret;
#  464|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_open_seccomp_bpf'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c:462:21: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open_rundir_dirfd(*container_50->context.state_root,  err)'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'libcrun_open_seccomp_bpf'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:56:40: note: in definition of macro 'UNLIKELY'
#  460|   
#  461|     ret = libcrun_get_state_directory (&dir, state_root, NULL, err);
#  462|->   if (UNLIKELY (ret < 0))
#  463|       return ret;
#  464|   

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c: scope_hint: In function 'open_rundir_dirfd'
crun-1.19.1-build/crun-HEAD/src/libcrun/seccomp.c:465:31: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(dir, 2686976)'
#  463|       return ret;
#  464|   
#  465|->   dirfd = TEMP_FAILURE_RETRY (open (dir, O_PATH | O_DIRECTORY | O_CLOEXEC));
#  466|     if (UNLIKELY (dirfd < 0))
#  467|       return crun_make_error (err, errno, "open `%s`", dir);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'get_run_directory'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:86:1: warning[-Wanalyzer-malloc-leak]: leak of 'root'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:22: included_from: Included from here.
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'get_run_directory'
#   84|   
#   85|     return 0;
#   86|-> }
#   87|   
#   88|   int

Error: GCC_ANALYZER_WARNING (CWE-775):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_container_delete_status'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:580:36: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'open(dir, 2686976)'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
#  578|       return ret;
#  579|   
#  580|->   rundir_dfd = TEMP_FAILURE_RETRY (open (dir, O_DIRECTORY | O_PATH | O_CLOEXEC));
#  581|     if (UNLIKELY (rundir_dfd < 0))
#  582|       return crun_make_error (err, errno, "cannot open run directory `%s`", dir);

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'libcrun_get_containers_list'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:633:9: warning[-Wanalyzer-malloc-leak]: leak of 'opendir(root)'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
#  631|       return ret;
#  632|   
#  633|->   dir = opendir (root);
#  634|     if (UNLIKELY (dir == NULL))
#  635|       return crun_make_error (err, errno, "cannot opendir `%s`", root);

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:105:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'rundir_dfd'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c:83:3: note: in expansion of macro 'STEAL_POINTER'
crun-1.19.1-build/crun-HEAD/src/libcrun/status.c: scope_hint: In function 'cleanup_closep.part.0'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  103|     int *pp = (int *) p;
#  104|     if (*pp >= 0)
#  105|->     TEMP_FAILURE_RETRY (close (*pp));
#  106|   }
#  107|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup("/run/crun")'
#  220|   
#  221|     ret = strdup (str);
#  222|->   if (ret == NULL)
#  223|       OOM ();
#  224|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(*_76->process.apparmor_profile)'
crun-1.19.1-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
crun-1.19.1-build/crun-HEAD/src/libcrun/container.c: scope_hint: In function 'libcrun_container_exec_with_options'
#  220|   
#  221|     ret = strdup (str);
#  222|->   if (ret == NULL)
#  223|       OOM ();
#  224|   

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'get_run_directory'
crun-1.19.1-build/crun-HEAD/src/libcrun/utils.h:222:6: warning[-Wanalyzer-malloc-leak]: leak of 'xstrdup(state_root)'
#  220|   
#  221|     ret = strdup (str);
#  222|->   if (ret == NULL)
#  223|       OOM ();
#  224|