Task #113121 - policycoreutils-3.10-1.fc44/scan-results.err
back to task #113121download
Error: SHELLCHECK_WARNING (CWE-156):
/usr/bin/fixfiles:46:7: warning[SC2046]: Quote this to prevent word splitting.
# 44| FS="`cat /proc/self/mounts | sort | uniq | awk '{print $2}'`"
# 45| for i in $FS; do
# 46|-> if [ `useseclabel` -ge 0 ]
# 47| then
# 48| grep -F " $i " /proc/self/mounts | awk '{print $4}' | grep -E --silent '(^|,)seclabel(,|$)' && echo $i
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:157:103: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 155| LogReadOnly
# 156| for m in `echo $FILESYSTEMSRW`; do
# 157|-> find $m -mount -newermt $DATE -print0 2>/dev/null | ${RESTORECON} ${FORCEFLAG} ${VERBOSE} ${THREADS} $* -i -0 -f -
# 158| done;
# 159| }
Error: SHELLCHECK_WARNING (CWE-477):
/usr/bin/fixfiles:172:18: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 170| LogExcluded
# 171|
# 172|-> if [ -f ${PREFC} -a -x /usr/bin/diff ]; then
# 173| TEMPFILE=`mktemp ${FC}.XXXXXXXXXX`
# 174| test -z "$TEMPFILE" && exit
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:201:66: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 199| fi;
# 200| done |
# 201|-> ${RESTORECON} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} ${THREADS} $* -i -R -f -;
# 202| rm -f ${TEMPFILE} ${PREFCTEMPFILE}
# 203| fi
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:224:64: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 222| mkdir -p "${TMP_MOUNT}${m}" || exit 1
# 223| mount --bind "${m}" "${TMP_MOUNT}${m}" || exit 1
# 224|-> ${SETFILES} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} ${THREADS} $* -q ${FC} -r "${TMP_MOUNT}" "${TMP_MOUNT}${m}"
# 225| umount "${TMP_MOUNT}${m}" || exit 1
# 226| rm -rf "${TMP_MOUNT}" || echo "Error cleaning up."
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:240:18: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 238| # [-B | -N time ]
# 239| if [ -n "$BOOTTIME" ]; then
# 240|-> newer $BOOTTIME $*
# 241| return
# 242| fi
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:246:19: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 244| # -C PREVIOUS_FILECONTEXT
# 245| if [ "$RESTORE_MODE" == PREFC ]; then
# 246|-> diff_filecontext $*
# 247| return
# 248| fi
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:258:83: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 256| RPMFILES)
# 257| for i in `echo "$RPMFILES" | sed 's/,/ /g'`; do
# 258|-> rpmlist $i | ${RESTORECON} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} ${THREADS} $* -i -R -f -
# 259| done
# 260| ;;
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:262:66: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 260| ;;
# 261| FILEPATH)
# 262|-> ${RESTORECON} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} ${THREADS} $* -R -- "$FILEPATH"
# 263| ;;
# 264| *)
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:270:61: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 268|
# 269| if [ -z "$BIND_MOUNT_FILESYSTEMS" ]; then
# 270|-> ${SETFILES} ${VERBOSE} ${EXCLUDEDIRS} ${FORCEFLAG} $* -q ${THREADS} ${FC} ${FILESYSTEMSRW}
# 271| else
# 272| # we bind mount so we can fix the labels of files that have already been
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:281:43: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems.
# 279| else
# 280| trap umount_TMP_MOUNT EXIT
# 281|-> fix_labels_on_mountpoint $*
# 282| trap EXIT
# 283| fi
Error: SHELLCHECK_WARNING (CWE-477):
/usr/bin/fixfiles:314:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 312|
# 313| relabel() {
# 314|-> if [ -n "$RESTORE_MODE" -a "$RESTORE_MODE" != DEFAULT ]; then
# 315| usage
# 316| exit 1
Error: SHELLCHECK_WARNING (CWE-477):
/usr/bin/fixfiles:331:24: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
# 329| Do you wish to clean out the /tmp directory [N]? "
# 330| read answer
# 331|-> if [ "$answer" = y -o "$answer" = Y ]; then
# 332| fullrelabel
# 333| else
Error: SHELLCHECK_WARNING (CWE-477):
/usr/bin/fixfiles:348:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
# 346| relabel) relabel;;
# 347| onboot)
# 348|-> if [ -n "$RESTORE_MODE" -a "$RESTORE_MODE" != DEFAULT ]; then
# 349| usage
# 350| exit 1
Error: SHELLCHECK_WARNING (CWE-569):
/usr/bin/fixfiles:352:2: warning[SC2188]: This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
# 350| exit 1
# 351| fi
# 352|-> > /.autorelabel || exit $?
# 353| [ -z "$FORCEFLAG" ] || echo -n "$FORCEFLAG " >> /.autorelabel
# 354| [ -z "$BOOTTIME" ] || echo -n "-N $BOOTTIME " >> /.autorelabel
Error: SHELLCHECK_WARNING (CWE-156):
/usr/libexec/selinux/selinux-autorelabel:78:16: warning[SC2046]: Quote this to prevent word splitting.
# 76| # Check to see if a full relabel is needed
# 77| if [ "$READONLY" != "yes" ]; then
# 78|-> restorecon $(awk '!/^#/ && $4 !~ /noauto/ && $2 ~ /^\// { print $2 }' /etc/fstab) >/dev/null 2>&1
# 79| relabel_selinux
# 80| fi
Error: SHELLCHECK_WARNING (CWE-571):
/usr/share/sandbox/sandboxX.sh:4:8: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 2| trap "" TERM
# 3| context=`id -Z | secon -t -l -P`
# 4|-> export TITLE="Sandbox $context -- `grep ^#TITLE: ~/.sandboxrc | /usr/bin/cut -b8-80`"
# 5| [ -z $1 ] && export WAYLAND_NATIVE="no" || export WAYLAND_NATIVE="$1"
# 6| [ -z $2 ] && export SCREENSIZE="1000x700" || export SCREENSIZE="$2"
Error: COMPILER_WARNING (CWE-704):
selinux-3.10/policycoreutils/secon/secon.c: scope_hint: In function ‘my_getXcon_raw’
selinux-3.10/policycoreutils/secon/secon.c:365:29: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 365 | char *tmp = strchr(ptr, '\n');
# | ^~~~~~
# 363| *con = NULL;
# 364| if (ptr) { /* return *con = NULL, when proc file is empty */
# 365|-> char *tmp = strchr(ptr, '\n');
# 366|
# 367| if (tmp)
Error: COMPILER_WARNING (CWE-704):
selinux-3.10/policycoreutils/secon/secon.c:365:29: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 363| *con = NULL;
# 364| if (ptr) { /* return *con = NULL, when proc file is empty */
# 365|-> char *tmp = strchr(ptr, '\n');
# 366|
# 367| if (tmp)
Error: GCC_ANALYZER_WARNING (CWE-476):
selinux-3.10/policycoreutils/setsebool/setsebool.c:283:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘value_ptr’
selinux-3.10/policycoreutils/setsebool/setsebool.c:229:12: branch_false: following ‘false’ branch (when ‘vallist’ is non-NULL)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:229:12: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:235:20: branch_false: following ‘false’ branch (when ‘value_ptr’ is non-NULL)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:241:17: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:259:20: branch_false: following ‘false’ branch...
selinux-3.10/policycoreutils/setsebool/setsebool.c:261:17: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:269:12: branch_false: following ‘false’ branch...
selinux-3.10/policycoreutils/setsebool/setsebool.c:273:21: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:273:20: branch_false: following ‘false’ branch...
selinux-3.10/policycoreutils/setsebool/setsebool.c:278:15: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:280:16: branch_true: following ‘true’ branch (when ‘i < end’)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:281:28: branch_true: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:283:17: danger: dereference of NULL ‘value_ptr’
# 281| name = list[i];
# 282| value_ptr = strchr(name, '=');
# 283|-> *value_ptr = '\0';
# 284| value_ptr++;
# 285| if (pwd && pwd->pw_name)
Error: GCC_ANALYZER_WARNING (CWE-401):
selinux-3.10/policycoreutils/setsebool/setsebool.c:308:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
selinux-3.10/policycoreutils/setsebool/setsebool.c:229:12: branch_false: following ‘false’ branch (when ‘vallist’ is non-NULL)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:229:12: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:232:16: branch_true: following ‘true’ branch (when ‘i < end’)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:233:28: branch_true: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:235:20: branch_false: following ‘false’ branch (when ‘value_ptr’ is non-NULL)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:241:17: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:243:20: branch_true: following ‘true’ branch (when the strings are equal)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:257:24: branch_true: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:258:35: acquire_memory: allocated here
selinux-3.10/policycoreutils/setsebool/setsebool.c:259:20: branch_false: following ‘false’ branch...
selinux-3.10/policycoreutils/setsebool/setsebool.c:261:17: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:232:16: branch_true: following ‘true’ branch (when ‘i < end’)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:233:28: branch_true: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:235:20: branch_true: following ‘true’ branch (when ‘value_ptr’ is NULL)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:236:25: branch_true: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:305:12: branch_true: following ‘true’ branch (when ‘vallist’ is non-NULL)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:305:12: branch_true: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:306:29: branch_false: following ‘false’ branch (when ‘i >= boolcnt’)...
selinux-3.10/policycoreutils/setsebool/setsebool.c:308:17: branch_false: ...to here
selinux-3.10/policycoreutils/setsebool/setsebool.c:308:17: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/9)
# 306| for (i = 0; i < boolcnt; i++)
# 307| free(vallist[i].name);
# 308|-> free(vallist);
# 309| }
# 310| return -1;
Error: CPPCHECK_WARNING (CWE-476):
selinux-3.10/sandbox/seunshare.c:315: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: fptr
# 313| FILE *fptr;
# 314| fptr = fopen(dst, "w");
# 315|-> fclose(fptr);
# 316| }
# 317| /* mount file */