Task #106075 - added.err

back to task #106075
download
Error: GCC_ANALYZER_WARNING (CWE-688):
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'join_namespaces'
crun-HEAD/src/libcrun/linux.c:4129:17: warning[-Wanalyzer-null-argument]: use of NULL 'cwd' where non-null expected
/usr/include/unistd.h:517:12: note: argument 1 of 'chdir' must be non-null
# 4127|         if (value == CLONE_NEWNS)
# 4128|           {
# 4129|->           ret = chdir (cwd);
# 4130|             if (UNLIKELY (ret < 0))
# 4131|               return crun_make_error (err, errno, "chdir `%s`", cwd);

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_join_process'
crun-HEAD/src/libcrun/linux.c:5835:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_socket_fd[0]'
# 5833|   exit:
# 5834|     if (sync_socket_fd[0] >= 0)
# 5835|->     TEMP_FAILURE_RETRY (close (sync_socket_fd[0]));
# 5836|     if (sync_socket_fd[1] >= 0)
# 5837|       TEMP_FAILURE_RETRY (close (sync_socket_fd[1]));

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/linux.c:5837:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'sync_socket_fd[1]'
# 5835|       TEMP_FAILURE_RETRY (close (sync_socket_fd[0]));
# 5836|     if (sync_socket_fd[1] >= 0)
# 5837|->     TEMP_FAILURE_RETRY (close (sync_socket_fd[1]));
# 5838|     return ret;
# 5839|   }

Error: GCC_ANALYZER_WARNING (CWE-401):
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts'
crun-HEAD/src/libcrun/linux.c:6466:1: warning[-Wanalyzer-malloc-leak]: leak of 'data'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'libcrun_make_runtime_mounts'
# 6464|   
# 6465|     return run_in_container_namespace (status, do_mount_in_a_container, &args, err);
# 6466|-> }
# 6467|   
# 6468|   int

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'client_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:3855:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:4074:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'dest_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'gid_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:3855:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'map_fd'
/usr/include/features.h:540: included_from: Included from here.
/usr/include/bits/libc-header-start.h:33: included_from: Included from here.
/usr/include/stdio.h:28: included_from: Included from here.
crun-HEAD/src/libcrun/linux.h:21: included_from: Included from here.
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:365:20: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:108:25: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'uid_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c:3855:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'cleanup_closep.part.0'
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'cleanup_closep.part.0'
#  106|     int *pp = (int *) p;
#  107|     if (*pp >= 0)
#  108|->     TEMP_FAILURE_RETRY (close (*pp));
#  109|   }
#  110|   

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '**cgroup_dirfd.dirfd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'gid_fd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c:3855:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c:444:16: note: in expansion of macro 'crun_make_error'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-1341):
crun-HEAD/src/libcrun/utils.h:213:33: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor 'targetfd'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c:3855:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c:4074:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'close_and_reset.part.0'
#  211|     if (*fd >= 0)
#  212|       {
#  213|->       ret = TEMP_FAILURE_RETRY (close (*fd));
#  214|         if (LIKELY (ret == 0))
#  215|           *fd = -1;

Error: GCC_ANALYZER_WARNING (CWE-457):
crun-HEAD/src/libcrun/utils.h: scope_hint: In function 'xstrdup'
crun-HEAD/src/libcrun/utils.h:227:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value '*str'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'xstrdup'
crun-HEAD/src/libcrun/linux.c:3855:12: note: in expansion of macro 'crun_make_error'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'xstrdup'
crun-HEAD/src/libcrun/linux.c: scope_hint: In function 'xstrdup'
crun-HEAD/libocispec/src/ocispec/json_common.h:7: included_from: Included from here.
crun-HEAD/libocispec/src/ocispec/runtime_spec_schema_config_schema.h:7: included_from: Included from here.
crun-HEAD/src/libcrun/linux.h:27: included_from: Included from here.
/usr/include/string.h:202:14: note: argument 1 of 'strdup' must be a pointer to a null-terminated string
#  225|       return NULL;
#  226|   
#  227|->   ret = strdup (str);
#  228|     if (ret == NULL)
#  229|       OOM ();