libcap-2.76-1.fc43

List of Findings

Error: COMPILER_WARNING: [#def1] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/completed:1:16: error[error]: '__cgo__2' undeclared here (not in a function); did you mean '__cgo__1'?

Error: COMPILER_WARNING: [#def2] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:2:67: error[error]: invalid operands to binary * (have 'long int (*)(long int)' and 'int')

Error: COMPILER_WARNING: [#def3] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:3:60: error[error]: invalid type argument of unary '*' (have 'int')

Error: COMPILER_WARNING: [#def4] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:4:73: error[error]: invalid type argument of unary '*' (have 'int')

Error: COMPILER_WARNING: [#def5] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:4:75: error[error]: invalid operands to binary * (have 'int (*)(psx_sensitivity_t)' and 'int')

Error: COMPILER_WARNING: [#def6] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:5:68: error[error]: invalid operands to binary * (have 'long int (*)(long int,  long int,  long int,  long int)' and 'int')

Error: COMPILER_WARNING: [#def7] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:5:75: error[error]: invalid operands to binary * (have 'int (*)(psx_sensitivity_t)' and 'int')

Error: COMPILER_WARNING: [#def8] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:6:68: error[error]: invalid operands to binary * (have 'long int (*)(long int,  long int,  long int,  long int)' and 'int')

Error: COMPILER_WARNING: [#def9] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:6:68: error[error]: invalid operands to binary * (have 'long int (*)(long int,  long int,  long int,  long int,  long int,  long int,  long int)' and 'int')

Error: COMPILER_WARNING: [#def10] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-int-const:7:68: error[error]: invalid operands to binary * (have 'long int (*)(long int,  long int,  long int,  long int,  long int,  long int,  long int)' and 'int')

Error: COMPILER_WARNING: [#def11] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:2:67: error[error]: incompatible types when initializing type 'double' using type 'long int (*)(long int)'

Error: COMPILER_WARNING: [#def12] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:3:73: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def13] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:4:67: error[error]: incompatible types when initializing type 'double' using type 'int (*)(psx_sensitivity_t)'

Error: COMPILER_WARNING: [#def14] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:4:86: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def15] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:5:67: error[error]: incompatible types when initializing type 'double' using type 'int (*)(psx_sensitivity_t)'

Error: COMPILER_WARNING: [#def16] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:5:67: error[error]: incompatible types when initializing type 'double' using type 'long int (*)(long int,  long int,  long int,  long int)'

Error: COMPILER_WARNING: [#def17] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:6:67: error[error]: incompatible types when initializing type 'double' using type 'long int (*)(long int,  long int,  long int,  long int)'

Error: COMPILER_WARNING: [#def18] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:6:67: error[error]: incompatible types when initializing type 'double' using type 'long int (*)(long int,  long int,  long int,  long int,  long int,  long int,  long int)'

Error: COMPILER_WARNING: [#def19] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-num-const:7:67: error[error]: incompatible types when initializing type 'double' using type 'long int (*)(long int,  long int,  long int,  long int,  long int,  long int,  long int)'

Error: COMPILER_WARNING: [#def20] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:1:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def21] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:2:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def22] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:3:73: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def23] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:4:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def24] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:4:86: error[error]: expected expression before ';' token

Error: COMPILER_WARNING: [#def25] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:5:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def26] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:6:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def27] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-str-lit:7:67: error[error]: invalid initializer

Error: COMPILER_WARNING: [#def28] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:1:37: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def29] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:2:39: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def30] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:4:47: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def31] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:5:40: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def32] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:5:47: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def33] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:6:40: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: COMPILER_WARNING: [#def34] [important]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/not-type:7:40: error[error]: '__cgo_undefined__2' undeclared (first use in this function)

Error: GCC_ANALYZER_WARNING (CWE-688): [#def35]
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/psx.c:108:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘psx_tracker.pid_path’ where non-null expected
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/psx.c:159:45: enter_function: entry to ‘psx_lock’
libcap-2.76/go/vendor/kernel.org/pub/linux/libs/security/libcap/psx/psx.c:163:9: call_function: calling ‘_psx_proc_start’ from ‘psx_lock’
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  106|   	psx_tracker.pid_path = calloc(1, 3*sizeof(pid) + sizeof(taskdir_fmt));
#  107|       }
#  108|->     sprintf(psx_tracker.pid_path, taskdir_fmt, pid);
#  109|       psx_tracker.state = _PSX_IDLE;
#  110|       psx_tracker.cmd.active = 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def36]
libcap-2.76/libcap/../psx/psx.c:108:5: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘psx_tracker.pid_path’ where non-null expected
libcap-2.76/libcap/../psx/psx.c:159:45: enter_function: entry to ‘psx_lock’
libcap-2.76/libcap/../psx/psx.c:163:9: call_function: calling ‘_psx_proc_start’ from ‘psx_lock’
#argument 1 of ‘__builtin_sprintf’ must be non-null
#  106|   	psx_tracker.pid_path = calloc(1, 3*sizeof(pid) + sizeof(taskdir_fmt));
#  107|       }
#  108|->     sprintf(psx_tracker.pid_path, taskdir_fmt, pid);
#  109|       psx_tracker.state = _PSX_IDLE;
#  110|       psx_tracker.cmd.active = 0;

Error: CPPCHECK_WARNING (CWE-401): [#def37]
libcap-2.76/libcap/cap_alloc.c:173: error[memleak]: Memory leak: base
#  171|       base->magic = CAP_IAB_MAGIC;
#  172|       base->size = sizeof(struct _cap_alloc_s);
#  173|->     return &base->u.iab;
#  174|   }
#  175|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def38]
libcap-2.76/libcap/cap_alloc.c:173:12: warning[-Wanalyzer-malloc-leak]: leak of ‘base’
libcap-2.76/libcap/cap_alloc.c:166:33: acquire_memory: allocated here
libcap-2.76/libcap/cap_alloc.c:167:8: branch_false: following ‘false’ branch (when ‘base’ is non-NULL)...
libcap-2.76/libcap/cap_alloc.c:171:5: branch_false: ...to here
libcap-2.76/libcap/cap_alloc.c:173:12: danger: ‘base’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  171|       base->magic = CAP_IAB_MAGIC;
#  172|       base->size = sizeof(struct _cap_alloc_s);
#  173|->     return &base->u.iab;
#  174|   }
#  175|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def39]
libcap-2.76/libcap/cap_alloc.c:226:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libcap-2.76/libcap/cap_alloc.c:215:33: acquire_memory: allocated here
libcap-2.76/libcap/cap_alloc.c:216:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
libcap-2.76/libcap/cap_alloc.c:220:5: branch_false: ...to here
libcap-2.76/libcap/cap_alloc.c:226:5: danger: ‘data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  224|       attr->arg0 = arg0;
#  225|       attr->argv = argv;
#  226|->     attr->envp = envp;
#  227|       return attr;
#  228|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
libcap-2.76/libcap/cap_alloc.c:248:5: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libcap-2.76/libcap/cap_alloc.c:239:33: acquire_memory: allocated here
libcap-2.76/libcap/cap_alloc.c:240:8: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)...
libcap-2.76/libcap/cap_alloc.c:244:5: branch_false: ...to here
libcap-2.76/libcap/cap_alloc.c:248:5: danger: ‘data’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
#  246|   
#  247|       struct cap_launch_s *attr = &data->u.launcher;
#  248|->     attr->custom_setup_fn = callback_fn;
#  249|       return attr;
#  250|   }

Error: GCC_ANALYZER_WARNING (CWE-617): [#def41]
libcap-2.76/libcap/execable.h:56:17: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
libcap-2.76/libcap/execable.c:40:1: enter_function: entry to ‘__so_start’
libcap-2.76/libcap/execable.c:40:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’
#   54|   		    free(mem);
#   55|   		}
#   56|-> 		exit(1);
#   57|   	    }
#   58|   	    mem = new_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libcap-2.76/libcap/execable.h:83:1: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
libcap-2.76/libcap/execable.c:40:1: enter_function: entry to ‘__so_start’
libcap-2.76/libcap/execable.c:40:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’
#   81|       *argc_p = argc;
#   82|       *argv_p = argv;
#   83|-> }
#   84|   
#   85|   /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libcap-2.76/libcap/execable.h:83:1: warning[-Wanalyzer-malloc-leak]: leak of ‘new_mem’
libcap-2.76/libcap/execable.c:40:1: enter_function: entry to ‘__so_start’
libcap-2.76/libcap/execable.c:40:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’
#   81|       *argc_p = argc;
#   82|       *argv_p = argv;
#   83|-> }
#   84|   
#   85|   /*

Error: GCC_ANALYZER_WARNING (CWE-617): [#def44]
libcap-2.76/pam_cap/../libcap/execable.h:56:17: warning[-Wanalyzer-tainted-assertion]: use of attacked-controlled value in condition for assertion
libcap-2.76/pam_cap/execable.c:19:1: enter_function: entry to ‘__so_start’
libcap-2.76/pam_cap/execable.c:19:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’
#   54|   		    free(mem);
#   55|   		}
#   56|-> 		exit(1);
#   57|   	    }
#   58|   	    mem = new_mem;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libcap-2.76/pam_cap/../libcap/execable.h:83:1: warning[-Wanalyzer-malloc-leak]: leak of ‘mem’
libcap-2.76/pam_cap/execable.c:19:1: enter_function: entry to ‘__so_start’
libcap-2.76/pam_cap/execable.c:19:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’
#   81|       *argc_p = argc;
#   82|       *argv_p = argv;
#   83|-> }
#   84|   
#   85|   /*

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libcap-2.76/pam_cap/../libcap/execable.h:83:1: warning[-Wanalyzer-malloc-leak]: leak of ‘new_mem’
libcap-2.76/pam_cap/execable.c:19:1: enter_function: entry to ‘__so_start’
libcap-2.76/pam_cap/execable.c:19:1: call_function: calling ‘__execable_parse_args’ from ‘__so_start’
#   81|       *argc_p = argc;
#   82|       *argv_p = argv;
#   83|-> }
#   84|   
#   85|   /*

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-102.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namelibcap-2.76-1.fc43
store-results-to/tmp/tmp9lx1yqu7/libcap-2.76-1.fc43.tar.xz
time-created2025-04-25 13:53:02
time-finished2025-04-25 13:55:37
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp9lx1yqu7/libcap-2.76-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp9lx1yqu7/libcap-2.76-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9