podman-5.6.2-2.fc44

List of Findings

Error: SHELLCHECK_WARNING (CWE-758): [#def1]
/etc/profile.d/podman-docker.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
#    1|-> # DOCKER_HOST initialization
#    2|   
#    3|   if [ -z "${DOCKER_HOST-}" ]; then

Error: COMPILER_WARNING: [#def2] [important]
podman-5.6.2/libpod/lock/shm/completed:1:16: error[error]: '__cgo__2' undeclared here (not in a function); did you mean '__cgo__1'?

Error: COMPILER_WARNING: [#def3] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:1:63: error[error]: invalid operands to binary * (have 'char * (*)(_GoString_)' and 'int')

Error: COMPILER_WARNING: [#def4] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:2:80: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}} and 'int')

Error: COMPILER_WARNING: [#def5] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:3:74: error[error]: invalid operands to binary * (have 'int64_t (*)(shm_struct_t *)' {{aka 'long int (*)(struct shm_struct *)'}} and 'int')

Error: COMPILER_WARNING: [#def6] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:4:71: error[error]: invalid operands to binary * (have 'int64_t (*)(shm_struct_t *)' {{aka 'long int (*)(struct shm_struct *)'}} and 'int')

Error: COMPILER_WARNING: [#def7] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:5:33: error[error]: enumerator value for '__cgo_undefined__3' is not an integer constant

Error: COMPILER_WARNING: [#def8] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:6:70: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *)' {{aka 'int (*)(struct shm_struct *)'}} and 'int')

Error: COMPILER_WARNING: [#def9] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:7:81: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *)' {{aka 'int (*)(struct shm_struct *)'}} and 'int')

Error: COMPILER_WARNING: [#def10] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:8:76: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}} and 'int')

Error: COMPILER_WARNING: [#def11] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:9:60: error[error]: invalid operands to binary * (have 'void (*)(void *)' and 'int')

Error: COMPILER_WARNING: [#def12] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:10:60: error[error]: invalid type argument of unary '*' (have 'int')

Error: COMPILER_WARNING: [#def13] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:11:71: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}} and 'int')

Error: COMPILER_WARNING: [#def14] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:12:70: error[error]: invalid operands to binary * (have 'shm_struct_t * (*)(char *, uint32_t,  int *)' {{aka 'struct shm_struct * (*)(char *, unsigned int,  int *)'}} and 'int')

Error: COMPILER_WARNING: [#def15] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:13:71: error[error]: invalid operands to binary * (have 'shm_struct_t * (*)(char *, uint32_t,  int *)' {{aka 'struct shm_struct * (*)(char *, unsigned int,  int *)'}} and 'int')

Error: COMPILER_WARNING: [#def16] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:14:69: error[error]: invalid type argument of unary '*' (have 'int')

Error: COMPILER_WARNING: [#def17] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:15:67: error[error]: invalid operands to binary * (have 'int (*)(const char *)' and 'int')

Error: COMPILER_WARNING: [#def18] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:16:65: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}} and 'int')

Error: COMPILER_WARNING: [#def19] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:17:65: error[error]: invalid type argument of unary '*' (have 'int')

Error: COMPILER_WARNING: [#def20] [important]
podman-5.6.2/libpod/lock/shm/not-int-const:18:73: error[error]: invalid operands to binary * (have 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}} and 'int')

Error: COMPILER_WARNING: [#def21] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:1:67: error[error]: incompatible types when initializing type 'double' using type 'char * (*)(_GoString_)'

Error: COMPILER_WARNING: [#def22] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:2:67: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}}

Error: COMPILER_WARNING: [#def23] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:3:67: error[error]: incompatible types when initializing type 'double' using type 'int64_t (*)(shm_struct_t *)' {{aka 'long int (*)(struct shm_struct *)'}}

Error: COMPILER_WARNING: [#def24] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:4:67: error[error]: incompatible types when initializing type 'double' using type 'int64_t (*)(shm_struct_t *)' {{aka 'long int (*)(struct shm_struct *)'}}

Error: COMPILER_WARNING: [#def25] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:6:67: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *)' {{aka 'int (*)(struct shm_struct *)'}}

Error: COMPILER_WARNING: [#def26] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:7:67: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *)' {{aka 'int (*)(struct shm_struct *)'}}

Error: COMPILER_WARNING: [#def27] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:8:67: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}}

Error: COMPILER_WARNING: [#def28] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:9:67: error[error]: incompatible types when initializing type 'double' using type 'void (*)(void *)'

Error: COMPILER_WARNING: [#def29] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:10:73: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def30] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:11:68: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}}

Error: COMPILER_WARNING: [#def31] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:12:68: error[error]: incompatible types when initializing type 'double' using type 'shm_struct_t * (*)(char *, uint32_t,  int *)' {{aka 'struct shm_struct * (*)(char *, unsigned int,  int *)'}}

Error: COMPILER_WARNING: [#def32] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:13:68: error[error]: incompatible types when initializing type 'double' using type 'shm_struct_t * (*)(char *, uint32_t,  int *)' {{aka 'struct shm_struct * (*)(char *, unsigned int,  int *)'}}

Error: COMPILER_WARNING: [#def33] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:14:82: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def34] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:15:68: error[error]: incompatible types when initializing type 'double' using type 'int (*)(const char *)'

Error: COMPILER_WARNING: [#def35] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:16:68: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}}

Error: COMPILER_WARNING: [#def36] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:17:78: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def37] [important]
podman-5.6.2/libpod/lock/shm/not-num-const:18:68: error[error]: incompatible types when initializing type 'double' using type 'int32_t (*)(shm_struct_t *, uint32_t)' {{aka 'int (*)(struct shm_struct *, unsigned int)'}}

Error: COMPILER_WARNING: [#def38] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:1:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def39] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:2:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def40] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:3:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def41] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:4:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def42] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:5:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def43] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:6:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def44] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:7:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def45] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:8:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def46] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:9:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def47] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:10:73: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def48] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:11:68: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def49] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:12:68: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def50] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:13:68: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def51] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:14:82: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def52] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:15:68: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def53] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:16:68: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def54] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:17:78: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def55] [important]
podman-5.6.2/libpod/lock/shm/not-str-lit:18:68: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def56] [important]
podman-5.6.2/libpod/lock/shm/not-type:1:35: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def57] [important]
podman-5.6.2/libpod/lock/shm/not-type:2:52: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def58] [important]
podman-5.6.2/libpod/lock/shm/not-type:3:46: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def59] [important]
podman-5.6.2/libpod/lock/shm/not-type:4:43: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def60] [important]
podman-5.6.2/libpod/lock/shm/not-type:5:41: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def61] [important]
podman-5.6.2/libpod/lock/shm/not-type:6:42: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def62] [important]
podman-5.6.2/libpod/lock/shm/not-type:7:53: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def63] [important]
podman-5.6.2/libpod/lock/shm/not-type:8:48: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def64] [important]
podman-5.6.2/libpod/lock/shm/not-type:9:32: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def65] [important]
podman-5.6.2/libpod/lock/shm/not-type:11:43: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def66] [important]
podman-5.6.2/libpod/lock/shm/not-type:12:42: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def67] [important]
podman-5.6.2/libpod/lock/shm/not-type:13:43: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def68] [important]
podman-5.6.2/libpod/lock/shm/not-type:15:39: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def69] [important]
podman-5.6.2/libpod/lock/shm/not-type:16:37: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def70] [important]
podman-5.6.2/libpod/lock/shm/not-type:18:45: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
podman-5.6.2/pkg/rootless/rootless_linux.c:43:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd’
podman-5.6.2/pkg/rootless/rootless_linux.c:298:1: enter_function: entry to ‘get_cmd_line_args’
podman-5.6.2/pkg/rootless/rootless_linux.c:308:8: acquire_resource: opened here
podman-5.6.2/pkg/rootless/rootless_linux.c:309:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:313:12: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:314:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:301:21: call_function: inlined call to ‘cleanup_closep’ from ‘get_cmd_line_args’
 branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:301:21: call_function: inlined call to ‘cleanup_closep’ from ‘get_cmd_line_args’
podman-5.6.2/pkg/rootless/rootless_linux.c:300:22: call_function: inlined call to ‘cleanup_freep’ from ‘get_cmd_line_args’
#   41|   {
#   42|     void **pp = (void **) p;
#   43|->   free (*pp);
#   44|   }
#   45|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def72]
podman-5.6.2/pkg/rootless/rootless_linux.c:51:5: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘*(void *)p’
podman-5.6.2/pkg/rootless/rootless_linux.c:51:5: release_resource: first ‘close’ here
podman-5.6.2/pkg/rootless/rootless_linux.c:51:5: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:51:5: danger: second ‘close’ here; first ‘close’ was at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#   49|     int *pp = p;
#   50|     if (*pp >= 0)
#   51|->     TEMP_FAILURE_RETRY (close (*pp));
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-1341): [#def73]
podman-5.6.2/pkg/rootless/rootless_linux.c:51:5: warning[-Wanalyzer-fd-double-close]: double ‘close’ of file descriptor ‘fd’
podman-5.6.2/pkg/rootless/rootless_linux.c:298:1: enter_function: entry to ‘get_cmd_line_args’
podman-5.6.2/pkg/rootless/rootless_linux.c:308:8: acquire_resource: opened here
podman-5.6.2/pkg/rootless/rootless_linux.c:309:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:313:12: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:314:6: branch_true: following ‘true’ branch...
 branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:301:21: call_function: inlined call to ‘cleanup_closep’ from ‘get_cmd_line_args’
 branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:301:21: call_function: inlined call to ‘cleanup_closep’ from ‘get_cmd_line_args’
#   49|     int *pp = p;
#   50|     if (*pp >= 0)
#   51|->     TEMP_FAILURE_RETRY (close (*pp));
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def74]
podman-5.6.2/pkg/rootless/rootless_linux.c:79:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:718:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:726:14: branch_false: following ‘false’ branch (when ‘r >= 0’)...
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:736:15: call_function: calling ‘rename_noreplace’ from ‘create_pause_process’
#   77|   
#   78|     /* This might be an issue if another process is trying to read the file while it is empty.  */
#   79|->   ret = open (newpath, O_EXCL|O_CREAT, 0700);
#   80|     if (ret < 0)
#   81|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def75]
podman-5.6.2/pkg/rootless/rootless_linux.c:82:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:718:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:726:14: branch_false: following ‘false’ branch (when ‘r >= 0’)...
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:736:15: call_function: calling ‘rename_noreplace’ from ‘create_pause_process’
#   80|     if (ret < 0)
#   81|       return ret;
#   82|->   close (ret);
#   83|   
#   84|     /* We are sure we created the file, let's overwrite it.  */

Error: GCC_ANALYZER_WARNING (CWE-122): [#def76]
podman-5.6.2/pkg/rootless/rootless_linux.c:209:7: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
podman-5.6.2/pkg/rootless/rootless_linux.c:255:1: enter_function: entry to ‘do_preexec_hooks’
podman-5.6.2/pkg/rootless/rootless_linux.c:260:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:264:25: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:265:3: call_function: calling ‘do_preexec_hooks_dir’ from ‘do_preexec_hooks’
#  207|         strncpy (buffer + nfiles * (NAME_MAX + 1), de->d_name, NAME_MAX + 1);
#  208|         nfiles++;
#  209|->       buffer[nfiles * (NAME_MAX + 1)] = '\0';
#  210|       }
#  211|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def77]
podman-5.6.2/pkg/rootless/rootless_linux.c:212:3: warning[-Wanalyzer-null-argument]: use of NULL ‘buffer’ where non-null expected
podman-5.6.2/pkg/rootless/rootless_linux.c:255:1: enter_function: entry to ‘do_preexec_hooks’
podman-5.6.2/pkg/rootless/rootless_linux.c:260:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:264:25: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:265:3: call_function: calling ‘do_preexec_hooks_dir’ from ‘do_preexec_hooks’
#  210|       }
#  211|   
#  212|->   qsort (buffer, nfiles, NAME_MAX + 1, (int (*)(const void *, const void *)) strcmp);
#  213|   
#  214|     for (i = 0; i < nfiles; i++)

Error: GCC_ANALYZER_WARNING (CWE-465): [#def78]
podman-5.6.2/pkg/rootless/rootless_linux.c:377:18: warning[-Wanalyzer-deref-before-check]: check of ‘*argv’ for NULL after already dereferencing it
podman-5.6.2/pkg/rootless/rootless_linux.c:374:6: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:377:18: danger: pointer ‘*argv’ is checked for NULL here but it was already dereferenced at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
#  375|       return false;
#  376|   
#  377|->   for (argc = 0; argv[argc]; argc++)
#  378|       {
#  379|         if (argc == 0 || argv[argc][0] == '-')

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: danger: ‘p[0]’ leaks here
#  662|     if (pid < 0)
#  663|       {
#  664|->       close (p[0]);
#  665|         close (p[1]);
#  666|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: danger: ‘p[1]’ leaks here
#  662|     if (pid < 0)
#  663|       {
#  664|->       close (p[0]);
#  665|         close (p[1]);
#  666|         return -1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def81]
podman-5.6.2/pkg/rootless/rootless_linux.c:665:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:664:7: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:665:7: danger: ‘p[1]’ leaks here
#  663|       {
#  664|         close (p[0]);
#  665|->       close (p[1]);
#  666|         return -1;
#  667|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def82]
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: danger: ‘p[0]’ leaks here
#  672|         int r, r2;
#  673|   
#  674|->       close (p[1]);
#  675|         /* Block until we write the pid file.  */
#  676|         r = TEMP_FAILURE_RETRY (read (p[0], &b, 1));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def83]
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: danger: ‘p[1]’ leaks here
#  672|         int r, r2;
#  673|   
#  674|->       close (p[1]);
#  675|         /* Block until we write the pid file.  */
#  676|         r = TEMP_FAILURE_RETRY (read (p[0], &b, 1));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def84]
podman-5.6.2/pkg/rootless/rootless_linux.c:677:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:674:7: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:677:7: danger: ‘p[0]’ leaks here
#  675|         /* Block until we write the pid file.  */
#  676|         r = TEMP_FAILURE_RETRY (read (p[0], &b, 1));
#  677|->       close (p[0]);
#  678|   
#  679|         r2 = reexec_in_user_namespace_wait (pid, 0);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def85]
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[0]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: danger: ‘p[0]’ leaks here
#  687|         int r, fd;
#  688|   
#  689|->       close (p[0]);
#  690|   
#  691|         setsid ();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def86]
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: danger: ‘p[1]’ leaks here
#  687|         int r, fd;
#  688|   
#  689|->       close (p[0]);
#  690|   
#  691|         setsid ();

Error: GCC_ANALYZER_WARNING (CWE-775): [#def87]
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: danger: ‘p[1]’ leaks here
#  715|               }
#  716|   
#  717|->           fd = mkstemp (tmp_file_path);
#  718|             if (fd < 0)
#  719|               {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def88]
podman-5.6.2/pkg/rootless/rootless_linux.c:725:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:718:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:725:15: danger: ‘p[1]’ leaks here
#  723|               }
#  724|   
#  725|->           r = TEMP_FAILURE_RETRY (write (fd, pid_str, strlen (pid_str)));
#  726|             if (r < 0)
#  727|               {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def89]
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:718:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:726:14: branch_false: following ‘false’ branch (when ‘r >= 0’)...
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: danger: ‘p[1]’ leaks here
#  730|                 _exit (EXIT_FAILURE);
#  731|               }
#  732|->           close (fd);
#  733|   
#  734|             /* There can be another process at this point trying to configure the user namespace and the pause

Error: GCC_ANALYZER_WARNING (CWE-775): [#def90]
podman-5.6.2/pkg/rootless/rootless_linux.c:743:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:718:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:726:14: branch_false: following ‘false’ branch (when ‘r >= 0’)...
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:736:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:743:15: danger: ‘p[1]’ leaks here
#  741|               }
#  742|   
#  743|->           r = TEMP_FAILURE_RETRY (write (p[1], "0", 1));
#  744|             if (r < 0)
#  745|               {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def91]
podman-5.6.2/pkg/rootless/rootless_linux.c:749:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:699:17: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:703:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:710:15: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:710:14: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:717:16: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:718:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:726:14: branch_false: following ‘false’ branch (when ‘r >= 0’)...
podman-5.6.2/pkg/rootless/rootless_linux.c:732:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:736:14: branch_false: following ‘false’ branch...
 branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:744:14: branch_false: following ‘false’ branch (when ‘r >= 0’)...
podman-5.6.2/pkg/rootless/rootless_linux.c:749:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:749:11: danger: ‘p[1]’ leaks here
#  747|                 _exit (EXIT_FAILURE);
#  748|               }
#  749|->           close (p[1]);
#  750|   
#  751|             _exit (EXIT_SUCCESS);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def92]
podman-5.6.2/pkg/rootless/rootless_linux.c:757:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘p[1]’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:757:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:757:11: danger: ‘p[1]’ leaks here
#  755|             int null;
#  756|   
#  757|->           close (p[1]);
#  758|   
#  759|             null = open ("/dev/null", O_RDWR);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def93]
podman-5.6.2/pkg/rootless/rootless_linux.c:765:15: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
podman-5.6.2/pkg/rootless/rootless_linux.c:653:1: enter_function: entry to ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:658:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:661:9: call_function: inlined call to ‘syscall_clone’ from ‘create_pause_process’
podman-5.6.2/pkg/rootless/rootless_linux.c:662:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:669:6: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:689:7: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:693:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:696:10: branch_false: following ‘false’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:757:11: branch_false: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:759:18: acquire_resource: opened here
podman-5.6.2/pkg/rootless/rootless_linux.c:760:14: branch_true: following ‘true’ branch...
podman-5.6.2/pkg/rootless/rootless_linux.c:762:15: branch_true: ...to here
podman-5.6.2/pkg/rootless/rootless_linux.c:765:15: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(14)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/13)
#  763|                 dup2 (null, 1);
#  764|                 dup2 (null, 2);
#  765|->               close (null);
#  766|               }
#  767|   

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-28.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namepodman-5.6.2-2.fc44
store-results-to/tmp/tmpu640sa1o/podman-5.6.2-2.fc44.tar.xz
time-created2025-10-28 19:46:10
time-finished2025-10-28 19:50:24
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpu640sa1o/podman-5.6.2-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpu640sa1o/podman-5.6.2-2.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9