device-mapper-multipath-0.11.1-1.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-477): [#def1]
/usr/bin/mpathconf:79:18: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#   77|   {
#   78|   	shift 3
#   79|-> 	while [ -n "$1" -a -n "$2" ]; do
#   80|   		MAJOR=$(echo $1 | tr -d '(,')
#   81|   		MINOR=$(echo $2 | tr -d ')')

Error: SHELLCHECK_WARNING (CWE-156): [#def2]
/usr/bin/mpathconf:97:15: warning[SC2046]: Quote this to prevent word splitting.
#   95|   		add_wwid "${1##mpath-}"
#   96|   	else
#   97|-> 		get_dm_deps `dmsetup deps -u $1`
#   98|   	fi
#   99|   }

Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/usr/bin/mpathconf:236:45: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def4]
/usr/bin/mpathconf:236:59: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def5]
/usr/bin/mpathconf:236:77: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def6]
/usr/bin/mpathconf:236:93: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def7]
/usr/bin/mpathconf:236:110: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def8]
/usr/bin/mpathconf:236:131: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  234|   function validate_args
#  235|   {
#  236|-> 	if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" -o -n "$FOREIGN" -o -n "$OPTION_NAME" -o -n "$RECHECK_WWID" ]; then
#  237|   		echo "ignoring extra parameters on disable"
#  238|   		FRIENDLY=""

Error: SHELLCHECK_WARNING (CWE-477): [#def9]
/usr/bin/mpathconf:247:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  245|   		RECHECK_WWID=""
#  246|   	fi
#  247|-> 	if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then
#  248|   		echo "--user_friendly_names must be either 'y' or 'n'"
#  249|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def10]
/usr/bin/mpathconf:251:56: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  249|   		exit 1
#  250|   	fi
#  251|-> 	if [ -n "$RECHECK_WWID" ] && [ "$RECHECK_WWID" != "y" -a "$RECHECK_WWID" != "n" ]; then
#  252|   		echo "--recheck_wwid must be either 'y' or 'n'"
#  253|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def11]
/usr/bin/mpathconf:259:43: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def12]
/usr/bin/mpathconf:259:63: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def13]
/usr/bin/mpathconf:259:83: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def14]
/usr/bin/mpathconf:259:102: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def15]
/usr/bin/mpathconf:259:125: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def16]
/usr/bin/mpathconf:259:148: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  257|   	elif [ "$FIND" = "n" ]; then
#  258|   		FIND="off"
#  259|-> 	elif [ -n "$FIND" ] && [ "$FIND" != "on" -a "$FIND" != "yes" -a "$FIND" != "off" -a "$FIND" != "no" -a "$FIND" != "strict" -a "$FIND" != "greedy" -a "$FIND" != "smart" ]; then
#  260|   		echo "--find_multipaths must be one of 'on' 'yes' 'y' 'off' 'no' 'n' 'strict' 'greedy' or 'smart'"
#  261|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def17]
/usr/bin/mpathconf:263:48: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  261|   		exit 1
#  262|   	fi
#  263|-> 	if [ -n "$PROPERTY" ] && [ "$PROPERTY" != "y" -a "$PROPERTY" != "n" ]; then
#  264|   		echo "--property_blacklist must be either 'y' or 'n'"
#  265|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def18]
/usr/bin/mpathconf:267:46: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  265|   		exit 1
#  266|   	fi
#  267|-> 	if [ -n "$FOREIGN" ] && [ "$FOREIGN" != "y" -a "$FOREIGN" != "n" ]; then
#  268|   		echo "--enable_foreign must be either 'y' or 'n'"
#  269|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def19]
/usr/bin/mpathconf:283:20: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def20]
/usr/bin/mpathconf:283:34: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def21]
/usr/bin/mpathconf:283:52: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def22]
/usr/bin/mpathconf:283:70: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def23]
/usr/bin/mpathconf:283:87: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def24]
/usr/bin/mpathconf:283:108: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  281|   		fi
#  282|   	fi
#  283|-> 	if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" -a -z "$FOREIGN" -a -z "$OPTION_NAME" -a -z "$RECHECK_WWID" ]; then
#  284|   		SHOW_STATUS=1
#  285|   	fi

Error: SHELLCHECK_WARNING (CWE-477): [#def25]
/usr/bin/mpathconf:286:44: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  284|   		SHOW_STATUS=1
#  285|   	fi
#  286|-> 	if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then
#  287|   		echo "--with_module must be either 'y' or 'n'"
#  288|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def26]
/usr/bin/mpathconf:290:52: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  288|   		exit 1
#  289|   	fi
#  290|-> 	if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then
#  291|   		echo "--with_multipathd must be either 'y' or 'n'"
#  292|   		exit 1

Error: SHELLCHECK_WARNING (CWE-477): [#def27]
/usr/bin/mpathconf:294:21: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  292|   		exit 1
#  293|   	fi
#  294|-> 	if [ "$ENABLE" = 2 -a -z "$HAVE_OUTFILE" ]; then
#  295|   		echo "Because --allow makes changes that cannot be automatically reversed,"
#  296|   		echo "you must set --outfile when you set --allow"

Error: SHELLCHECK_WARNING (CWE-477): [#def28]
/usr/bin/mpathconf:341:19: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  339|   fi
#  340|   
#  341|-> if [ -z "$MODULE" -o "$MODULE" = "y" ]; then
#  342|   	if lsmod | grep -q "dm_multipath" ; then
#  343|   		HAVE_MODULE=1

Error: SHELLCHECK_WARNING (CWE-477): [#def29]
/usr/bin/mpathconf:419:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  417|   
#  418|   if [ -n "$SHOW_STATUS" ]; then
#  419|-> 	if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then
#  420|   		echo "multipath is enabled"
#  421|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def30]
/usr/bin/mpathconf:429:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  427|   		echo "find_multipaths is $HAVE_FIND"
#  428|   	fi
#  429|-> 	if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then
#  430|   		echo "user_friendly_names is disabled"
#  431|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def31]
/usr/bin/mpathconf:434:31: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  432|   		echo "user_friendly_names is enabled"
#  433|   	fi
#  434|-> 	if [ -z "$HAVE_RECHECK_WWID" -o "$HAVE_RECHECK_WWID" = 0 ]; then
#  435|   		echo "recheck_wwid is disabled"
#  436|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def32]
/usr/bin/mpathconf:439:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  437|   		echo "recheck_wwid is enabled"
#  438|   	fi
#  439|-> 	if [ -z "$HAVE_PROPERTY" -o "$HAVE_PROPERTY" = 0 ]; then
#  440|   		echo "default property blacklist is disabled"
#  441|   	else

Error: SHELLCHECK_WARNING (CWE-477): [#def33]
/usr/bin/mpathconf:444:26: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  442|   		echo "default property blacklist is enabled"
#  443|   	fi
#  444|-> 	if [ -z "$HAVE_FOREIGN" -o "$HAVE_FOREIGN" = 0 ]; then
#  445|   		echo "enable_foreign is not set (no foreign multipath devices will be shown)"
#  446|   	elif [ "$HAVE_FOREIGN" = 1 ]; then

Error: SHELLCHECK_WARNING (CWE-477): [#def34]
/usr/bin/mpathconf:578:27: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  576|   	fi
#  577|   elif [ "$PROPERTY" = "y" ]; then
#  578|-> 	if [ -z "$HAVE_PROPERTY" -a -z "$HAVE_EXCEPTIONS" ]; then
#  579|   		cat >> $TMPFILE << _EOF_
#  580|   

Error: SHELLCHECK_WARNING (CWE-477): [#def35]
/usr/bin/mpathconf:598:27: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  596|   
#  597|   if [ "$FOREIGN" = "n" ]; then
#  598|-> 	if [ "$HAVE_FOREIGN" = 1 -o "$HAVE_FOREIGN" = 3 ]; then
#  599|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*enable_foreign/#	enable_foreign/' $TMPFILE
#  600|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def36]
/usr/bin/mpathconf:608:29: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  606|   ' $TMPFILE
#  607|   		CHANGED_CONFIG=1
#  608|-> 	elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 -o "$HAVE_FOREIGN" = 3 ]; then
#  609|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/	enable_foreign ".*"/' $TMPFILE
#  610|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def37]
/usr/bin/mpathconf:608:52: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  606|   ' $TMPFILE
#  607|   		CHANGED_CONFIG=1
#  608|-> 	elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 -o "$HAVE_FOREIGN" = 3 ]; then
#  609|   		sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/	enable_foreign ".*"/' $TMPFILE
#  610|   		CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def38]
/usr/bin/mpathconf:614:24: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  612|   fi
#  613|   
#  614|-> if [ -n "$OPTION_NAME" -a -n "$OPTION_VALUE" ]; then
#  615|   	if [ -z "$HAVE_OPTION" ]; then
#  616|   		sed -i '/^defaults[[:space:]]*{/ a\

Error: SHELLCHECK_WARNING (CWE-477): [#def39]
/usr/bin/mpathconf:624:26: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  622|   		CHANGED_CONFIG=1
#  623|   	fi
#  624|-> elif [ -n "$OPTION_NAME" -a -n "$HAVE_OPTION" ]; then
#  625|   	sed -i '/^defaults[[:space:]]*{/,/^}/{/^[[:space:]]*'"$OPTION_NAME"'\([[:space:]].*\)\?$/d}' $TMPFILE
#  626|   	CHANGED_CONFIG=1

Error: SHELLCHECK_WARNING (CWE-477): [#def40]
/usr/bin/mpathconf:656:29: warning[SC2166]: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
#  654|   		systemctl stop multipathd.service
#  655|   	fi
#  656|-> elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then
#  657|   	systemctl reload multipathd.service
#  658|   fi

Error: SHELLCHECK_WARNING (CWE-477): [#def41]
/usr/lib/udev/kpartx_id:28:18: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#   26|   UUID=$3
#   27|   
#   28|-> if [ -z "$MAJOR" -o -z "$MINOR" ]; then
#   29|       echo "usage: $0 major minor UUID"
#   30|       exit 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def42]
multipath-tools-0.11.1/kpartx/dasd.c:89:24: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘fd_dasd’
multipath-tools-0.11.1/kpartx/dasd.c:69:1: enter_function: entry to ‘read_dasd_pt’
multipath-tools-0.11.1/kpartx/dasd.c:88:12: branch_false: following ‘false’ branch (when ‘fd >= 0’)...
multipath-tools-0.11.1/kpartx/dasd.c:92:13: branch_false: ...to here
multipath-tools-0.11.1/kpartx/dasd.c:92:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/dasd.c:96:51: branch_false: ...to here
multipath-tools-0.11.1/kpartx/dasd.c:98:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/kpartx/dasd.c:102:29: branch_true: ...to here
multipath-tools-0.11.1/kpartx/dasd.c:102:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/dasd.c:106:17: branch_false: ...to here
multipath-tools-0.11.1/kpartx/dasd.c:108:20: branch_false: following ‘false’ branch (when ‘__major == 94’)...
multipath-tools-0.11.1/kpartx/dasd.c:119:17: call_function: inlined call to ‘gnu_dev_minor’ from ‘read_dasd_pt’
multipath-tools-0.11.1/kpartx/dasd.c:121:32: acquire_resource: opened here
multipath-tools-0.11.1/kpartx/dasd.c:121:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/dasd.c:134:20: branch_false: ...to here
multipath-tools-0.11.1/kpartx/dasd.c:134:20: branch_true: following ‘true’ branch (when ‘fd_dasd < 0’)...
 branch_true: ...to here
multipath-tools-0.11.1/kpartx/dasd.c:89:24: danger: ‘fd_dasd’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#   87|   
#   88|   	if (fd < 0) {
#   89|-> 		return -1;
#   90|   	}
#   91|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def43]
multipath-tools-0.11.1/kpartx/kpartx.c:417:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(device, 16384)’
multipath-tools-0.11.1/kpartx/kpartx.c:231:1: enter_function: entry to ‘main’
multipath-tools-0.11.1/kpartx/kpartx.c:248:9: call_function: calling ‘initpts’ from ‘main’
multipath-tools-0.11.1/kpartx/kpartx.c:248:9: return_function: returning to ‘main’ from ‘initpts’
multipath-tools-0.11.1/kpartx/kpartx.c:272:19: branch_false: following ‘false’ branch (when ‘argc > 1’)...
 branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:277:16: branch_true: following ‘true’ branch (when ‘arg != -1’)...
multipath-tools-0.11.1/kpartx/kpartx.c:278:17: branch_true: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:277:16: branch_false: following ‘false’ branch (when ‘arg == -1’)...
multipath-tools-0.11.1/kpartx/kpartx.c:321:13: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:332:12: branch_false: following ‘false’ branch (when ‘hotplug == 0’)...
multipath-tools-0.11.1/kpartx/kpartx.c:334:30: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:344:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:349:13: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:349:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:376:17: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:376:17: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:381:15: call_function: inlined call to ‘find_devname_offset’ from ‘main’
multipath-tools-0.11.1/kpartx/kpartx.c:383:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:384:58: branch_true: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:385:20: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:386:32: branch_true: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:395:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:398:12: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:398:12: branch_false: following ‘false’ branch (when ‘mapname’ is non-NULL)...
multipath-tools-0.11.1/kpartx/kpartx.c:401:12: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:401:12: branch_false: following ‘false’ branch (when ‘delim’ is non-NULL)...
multipath-tools-0.11.1/kpartx/kpartx.c:407:14: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:407:14: acquire_resource: opened here
multipath-tools-0.11.1/kpartx/kpartx.c:409:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/kpartx/kpartx.c:417:12: branch_false: ...to here
multipath-tools-0.11.1/kpartx/kpartx.c:417:12: danger: ‘open(device, 16384)’ leaks here; was opened at [(79)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/78)
#  415|   	int r = 0;
#  416|   
#  417|-> 	if (what == DELETE) {
#  418|   		r = dm_remove_partmaps(mapname, uuid, buf.st_rdev,
#  419|   				       verbose);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:635:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:641:5: enter_function: entry to ‘do_mpath_persistent_reserve_out’
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:650:15: call_function: calling ‘mpath_get_map’ from ‘do_mpath_persistent_reserve_out’
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:650:15: return_function: returning to ‘do_mpath_persistent_reserve_out’ from ‘mpath_get_map’
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:651:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:654:16: branch_false: ...to here
multipath-tools-0.11.1/libmpathpersist/mpath_persist_int.c:702:23: call_function: calling ‘mpath_prout_rel’ from ‘do_mpath_persistent_reserve_out’
#  633|   	free(pptr);
#  634|   out1:
#  635|-> 	free (pamp);
#  636|   out:
#  637|   	free (pr_buff);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def45]
multipath-tools-0.11.1/libmpathutil/parser.c:139:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘keyword’
multipath-tools-0.11.1/libmpathutil/parser.c:129:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmpathutil/parser.c:132:12: branch_false: ...to here
multipath-tools-0.11.1/libmpathutil/parser.c:137:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/parser.c:138:27: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/parser.c:138:27: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/parser.c:138:27: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/parser.c:137:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/parser.c:138:27: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/parser.c:139:29: danger: dereference of NULL ‘keyword’
#  137|   	for (i = 0; i < VECTOR_SIZE(v); i++) {
#  138|   		keyword = VECTOR_SLOT(v, i);
#  139|-> 		if ((strlen(keyword->string) == len) &&
#  140|   		    !strcmp(keyword->string, name))
#  141|   			return keyword;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def46]
multipath-tools-0.11.1/libmpathutil/vector.c:86:34: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read
multipath-tools-0.11.1/libmpathutil/vector.c:78:1: enter_function: entry to ‘vector_insert_slot’
multipath-tools-0.11.1/libmpathutil/vector.c:82:14: call_function: calling ‘vector_alloc_slot’ from ‘vector_insert_slot’
multipath-tools-0.11.1/libmpathutil/vector.c:82:14: return_function: returning to ‘vector_insert_slot’ from ‘vector_alloc_slot’
multipath-tools-0.11.1/libmpathutil/vector.c:82:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:85:18: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/vector.c:85:18: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:86:34: danger: read of 8 bytes at offset ‘(long unsigned int)(*v.allocated + -2) * 8’ exceeds the buffer
#   84|   
#   85|   	for (i = VECTOR_SIZE(v) - 2; i >= slot; i--)
#   86|-> 		v->slot[i + 1] = v->slot[i];
#   87|   
#   88|   	v->slot[slot] = value;

Error: GCC_ANALYZER_WARNING (CWE-122): [#def47]
multipath-tools-0.11.1/libmpathutil/vector.c:128:28: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
multipath-tools-0.11.1/libmpathutil/vector.c:137:1: enter_function: entry to ‘vector_repack’
multipath-tools-0.11.1/libmpathutil/vector.c:141:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:144:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_false: following ‘false’ branch (when ‘i <= 0’)...
multipath-tools-0.11.1/libmpathutil/vector.c:144:41: branch_false: ...to here
multipath-tools-0.11.1/libmpathutil/vector.c:144:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/vector.c:146:25: call_function: calling ‘vector_del_slot’ from ‘vector_repack’
multipath-tools-0.11.1/libmpathutil/vector.c:146:25: return_function: returning to ‘vector_repack’ from ‘vector_del_slot’
multipath-tools-0.11.1/libmpathutil/vector.c:144:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: ...to here
multipath-tools-0.11.1/libmpathutil/vector.c:145:20: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmpathutil/vector.c:146:25: call_function: calling ‘vector_del_slot’ from ‘vector_repack’
#  126|   		void *new_slot;
#  127|   
#  128|-> 		new_slot = realloc(v->slot, sizeof (void *) * v->allocated);
#  129|   		if (!new_slot)
#  130|   			v->allocated += VECTOR_DEFAULT_SIZE;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
multipath-tools-0.11.1/libmultipath/alias.c:201:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bdg’
multipath-tools-0.11.1/libmultipath/alias.c:708:12: enter_function: entry to ‘_check_bindings_file’
multipath-tools-0.11.1/libmultipath/alias.c:731:16: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:735:20: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:735:21: call_function: calling ‘read_binding’ from ‘_check_bindings_file’
multipath-tools-0.11.1/libmultipath/alias.c:735:21: return_function: returning to ‘_check_bindings_file’ from ‘read_binding’
multipath-tools-0.11.1/libmultipath/alias.c:735:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:739:28: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:748:25: call_function: calling ‘add_binding’ from ‘_check_bindings_file’
#  199|   	/* Check for exact match */
#  200|   	if (i >= 0 && cmp == 0)
#  201|-> 		return strcmp(bdg->wwid, wwid) ?
#  202|   			BINDING_CONFLICT : BINDING_EXISTS;
#  203|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def49]
multipath-tools-0.11.1/libmultipath/alias.c:201:31: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bdg’
multipath-tools-0.11.1/libmultipath/alias.c:855:5: enter_function: entry to ‘check_alias_settings’
multipath-tools-0.11.1/libmultipath/alias.c:862:19: branch_true: following ‘true’ branch...
 branch_true: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:862:19: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:862:19: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:870:9: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:871:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:877:56: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:877:21: call_function: calling ‘add_binding’ from ‘check_alias_settings’
multipath-tools-0.11.1/libmultipath/alias.c:877:21: return_function: returning to ‘check_alias_settings’ from ‘add_binding’
multipath-tools-0.11.1/libmultipath/alias.c:877:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:870:9: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:870:9: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:871:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/alias.c:877:56: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/alias.c:877:21: call_function: calling ‘add_binding’ from ‘check_alias_settings’
#  199|   	/* Check for exact match */
#  200|   	if (i >= 0 && cmp == 0)
#  201|-> 		return strcmp(bdg->wwid, wwid) ?
#  202|   			BINDING_CONFLICT : BINDING_EXISTS;
#  203|   

Error: GCC_ANALYZER_WARNING (CWE-465): [#def50]
multipath-tools-0.11.1/libmultipath/dmparser.c:31:12: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
#   29|   	*dst = realloc(*dst, len);
#   30|   
#   31|-> 	if (!*dst) {
#   32|   		free(p);
#   33|   		return 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def51]
multipath-tools-0.11.1/libmultipath/dmparser.c:436:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:429:22: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:436:25: danger: dereference of NULL ‘pgp’
#  434|   		switch (*word) {
#  435|   		case 'D':
#  436|-> 			pgp->status = PGSTATE_DISABLED;
#  437|   			break;
#  438|   		case 'A':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
multipath-tools-0.11.1/libmultipath/dmparser.c:439:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:429:22: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:439:25: danger: dereference of NULL ‘pgp’
#  437|   			break;
#  438|   		case 'A':
#  439|-> 			pgp->status = PGSTATE_ACTIVE;
#  440|   			break;
#  441|   		case 'E':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def53]
multipath-tools-0.11.1/libmultipath/dmparser.c:442:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:429:22: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:442:25: danger: dereference of NULL ‘pgp’
#  440|   			break;
#  441|   		case 'E':
#  442|-> 			pgp->status = PGSTATE_ENABLED;
#  443|   			break;
#  444|   		default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def54]
multipath-tools-0.11.1/libmultipath/dmparser.c:445:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pgp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:429:22: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:445:25: danger: dereference of NULL ‘pgp’
#  443|   			break;
#  444|   		default:
#  445|-> 			pgp->status = PGSTATE_UNDEF;
#  446|   			break;
#  447|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
multipath-tools-0.11.1/libmultipath/dmparser.c:501:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:455:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:458:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:467:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:470:29: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:475:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:478:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:481:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:484:29: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:496:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:499:33: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:515:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:518:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:484:29: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:496:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:499:33: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:501:33: danger: dereference of NULL ‘pp’
#  499|   			switch (*word) {
#  500|   			case 'F':
#  501|-> 				pp->dmstate = PSTATE_FAILED;
#  502|   				break;
#  503|   			case 'A':

Error: GCC_ANALYZER_WARNING (CWE-476): [#def56]
multipath-tools-0.11.1/libmultipath/dmparser.c:504:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:455:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:458:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:467:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:470:29: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:475:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:478:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:481:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:484:29: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:496:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:499:33: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:515:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:518:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:484:29: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:496:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:499:33: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:504:33: danger: dereference of NULL ‘pp’
#  502|   				break;
#  503|   			case 'A':
#  504|-> 				pp->dmstate = PSTATE_ACTIVE;
#  505|   				break;
#  506|   			default:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def57]
multipath-tools-0.11.1/libmultipath/dmparser.c:518:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp’
multipath-tools-0.11.1/libmultipath/dmparser.c:345:5: enter_function: entry to ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:368:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:371:28: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:393:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:396:30: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:407:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:410:18: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:413:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:419:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:421:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:424:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:425:23: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:431:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:434:25: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:455:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:458:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:467:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:470:29: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:475:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:478:31: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:481:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:484:29: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:496:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:499:33: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:515:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:518:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:484:29: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:485:30: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:496:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:499:33: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/dmparser.c:515:28: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/dmparser.c:518:41: call_function: inlined call to ‘atoi’ from ‘disassemble_status’
multipath-tools-0.11.1/libmultipath/dmparser.c:518:25: danger: dereference of NULL ‘pp’
#  516|   				return 1;
#  517|   
#  518|-> 			pp->failcount = atoi(word);
#  519|   			free(word);
#  520|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def58]
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:494:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:895:6: enter_function: entry to ‘check__’
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:900:9: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:903:17: call_function: calling ‘_find_controllers’ from ‘check__’
#  492|   		struct nvme_path *path = nvme_pg_to_path(pg);
#  493|   
#  494|-> 		psyspath = udev_device_get_syspath(path->udev);
#  495|   		if (psyspath && !strcmp(ppath, psyspath))
#  496|   			return path;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def59]
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:646:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:895:6: enter_function: entry to ‘check__’
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:900:9: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:903:17: call_function: calling ‘_find_controllers’ from ‘check__’
#  644|   	vector_foreach_slot(&map->pgvec, pg, i) {
#  645|   		path = nvme_pg_to_path(pg);
#  646|-> 		path->seen = false;
#  647|   	}
#  648|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def60]
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:756:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘path’
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:895:6: enter_function: entry to ‘check__’
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:900:9: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/foreign/nvme.c:903:17: call_function: calling ‘_find_controllers’ from ‘check__’
#  754|   	vector_foreach_slot_backwards(&map->pgvec, pg, i) {
#  755|   		path = nvme_pg_to_path(pg);
#  756|-> 		if (!path->seen) {
#  757|   			condlog(1, "path %d not found in %s any more",
#  758|   				i, udev_device_get_sysname(map->udev));

Error: CPPCHECK_WARNING (CWE-758): [#def61]
multipath-tools-0.11.1/libmultipath/nvme-ioctl.c:572: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  570|   		     bool save, __u32 data_len, void *data, __u32 *result)
#  571|   {
#  572|-> 	__u32 cdw10 = fid | (save ? 1 << 31 : 0);
#  573|   
#  574|   	return nvme_feature(fd, nvme_admin_set_features, nsid, cdw10, value,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
multipath-tools-0.11.1/libmultipath/pgpolicies.c:191:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:283:5: enter_function: entry to ‘group_by_prio’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:285:16: call_function: calling ‘group_by_match’ from ‘group_by_prio’
#  189|   prios_match(struct path *pp1, struct path *pp2)
#  190|   {
#  191|-> 	return (pp1->priority == pp2->priority);
#  192|   }
#  193|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
multipath-tools-0.11.1/libmultipath/pgpolicies.c:191:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:283:5: enter_function: entry to ‘group_by_prio’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:285:16: call_function: calling ‘group_by_match’ from ‘group_by_prio’
#  189|   prios_match(struct path *pp1, struct path *pp2)
#  190|   {
#  191|-> 	return (pp1->priority == pp2->priority);
#  192|   }
#  193|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
multipath-tools-0.11.1/libmultipath/pgpolicies.c:197:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp1’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:291:5: enter_function: entry to ‘group_by_tpg’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:293:16: call_function: calling ‘group_by_match’ from ‘group_by_tpg’
#  195|   tpg_match(struct path *pp1, struct path *pp2)
#  196|   {
#  197|-> 	return (pp1->tpg_id == pp2->tpg_id);
#  198|   }
#  199|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def65]
multipath-tools-0.11.1/libmultipath/pgpolicies.c:197:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pp2’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:291:5: enter_function: entry to ‘group_by_tpg’
multipath-tools-0.11.1/libmultipath/pgpolicies.c:293:16: call_function: calling ‘group_by_match’ from ‘group_by_tpg’
#  195|   tpg_match(struct path *pp1, struct path *pp2)
#  196|   {
#  197|-> 	return (pp1->tpg_id == pp2->tpg_id);
#  198|   }
#  199|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
multipath-tools-0.11.1/libmultipath/print.c:920:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_path_layout()’
multipath-tools-0.11.1/libmultipath/print.c:1228:6: enter_function: entry to ‘print_multipath_topology__’
multipath-tools-0.11.1/libmultipath/print.c:1236:19: call_function: calling ‘alloc_path_layout’ from ‘print_multipath_topology__’
multipath-tools-0.11.1/libmultipath/print.c:1236:19: return_function: returning to ‘print_multipath_topology__’ from ‘alloc_path_layout’
multipath-tools-0.11.1/libmultipath/print.c:920:16: danger: ‘alloc_path_layout()’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
#  918|   
#  919|   fieldwidth_t *alloc_path_layout(void) {
#  920|-> 	return calloc(ARRAY_SIZE(pd), sizeof(fieldwidth_t));
#  921|   }
#  922|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
multipath-tools-0.11.1/libmultipath/print.c:977:16: warning[-Wanalyzer-malloc-leak]: leak of ‘alloc_multipath_layout()’
multipath-tools-0.11.1/libmultipath/print.c:1269:5: enter_function: entry to ‘snprint_multipath_topology__’
multipath-tools-0.11.1/libmultipath/print.c:1280:12: branch_false: following ‘false’ branch (when ‘verbosity > 0’)...
multipath-tools-0.11.1/libmultipath/print.c:1283:22: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/print.c:1283:22: call_function: calling ‘alloc_multipath_layout’ from ‘snprint_multipath_topology__’
multipath-tools-0.11.1/libmultipath/print.c:1283:22: return_function: returning to ‘snprint_multipath_topology__’ from ‘alloc_multipath_layout’
multipath-tools-0.11.1/libmultipath/print.c:977:16: danger: ‘alloc_multipath_layout()’ leaks here; was allocated at [(6)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/5)
#  975|   fieldwidth_t *alloc_multipath_layout(void) {
#  976|   
#  977|-> 	return calloc(ARRAY_SIZE(mpd), sizeof(fieldwidth_t));
#  978|   }
#  979|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def68]
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:106:39: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘opendir(&fullpath)’ where non-null expected
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:82:12: branch_false: following ‘false’ branch (when ‘args’ is non-NULL)...
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:87:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:87:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:93:13: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:93:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:102:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:103:17: acquire_memory: this call could return NULL
multipath-tools-0.11.1/libmultipath/prioritizers/iet.c:106:39: danger: argument 1 (‘opendir(&fullpath)’) from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) could be NULL where non-null expected
#  104|   
#  105|   	// loop to find device in /dev/disk/by-path
#  106|-> 	while( NULL != (dir_entry_p = readdir(dir_p))) {
#  107|   		if (dir_entry_p->d_name[0] != '.') {
#  108|   			char path[BUFFERSIZE] = "/dev/disk/by-path/";

Error: GCC_ANALYZER_WARNING (CWE-775): [#def69]
multipath-tools-0.11.1/libmultipath/sysfs.c:309:22: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pathbuf, 0)’
multipath-tools-0.11.1/libmultipath/sysfs.c:284:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/sysfs.c:289:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/sysfs.c:290:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/sysfs.c:292:17: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/sysfs.c:292:17: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/sysfs.c:297:9: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/sysfs.c:300:21: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/sysfs.c:301:21: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/sysfs.c:305:21: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/sysfs.c:309:22: acquire_resource: opened here
multipath-tools-0.11.1/libmultipath/sysfs.c:309:22: danger: ‘open(&pathbuf, 0)’ leaks here; was opened at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  307|   			continue;
#  308|   
#  309|-> 		fd = open(pathbuf, O_RDONLY);
#  310|   		if (fd == -1) {
#  311|   			condlog(1, "%s: error opening %s", __func__, pathbuf);

Error: GCC_ANALYZER_WARNING (CWE-126): [#def70]
multipath-tools-0.11.1/libmultipath/uevent.c:122:9: warning[-Wanalyzer-out-of-bounds]: stack-based buffer over-read
multipath-tools-0.11.1/libmultipath/uevent.c:683:5: enter_function: entry to ‘uevent_listen’
multipath-tools-0.11.1/libmultipath/uevent.c:696:12: branch_false: following ‘false’ branch (when ‘udev’ is non-NULL)...
multipath-tools-0.11.1/libmultipath/uevent.c:700:9: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:704:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/uevent.c:710:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:714:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/uevent.c:718:24: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:719:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/uevent.c:724:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:724:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/uevent.c:729:15: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:734:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:746:20: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/uevent.c:747:29: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/uevent.c:740:9: call_function: inlined call to ‘__pthread_cleanup_routine’ from ‘uevent_listen’
#  120|   	struct uevent *uev, *tmp;
#  121|   
#  122|-> 	list_for_each_entry_safe(uev, tmp, tmpq, node) {
#  123|   		list_del_init(&uev->node);
#  124|   		cleanup_uev(uev);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def71]
multipath-tools-0.11.1/libmultipath/valid.c:208:34: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&mountinfo, "r")’
multipath-tools-0.11.1/libmultipath/valid.c:294:1: enter_function: entry to ‘is_path_valid’
multipath-tools-0.11.1/libmultipath/valid.c:301:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:304:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:308:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:308:13: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:311:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:317:12: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:329:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:332:16: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:333:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:337:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:339:17: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:339:17: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:342:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:342:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:345:28: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:346:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:352:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:352:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:354:13: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:354:13: call_function: calling ‘is_device_in_use’ from ‘is_path_valid’
#  206|   		pthread_cleanup_push(cleanup_cache, cache);
#  207|   		if (mnt_table_set_cache(tbl, cache) == 0) {
#  208|-> 			stream = fopen(mountinfo, "r");
#  209|   			if (stream != NULL) {
#  210|   				pthread_cleanup_push(cleanup_fclose, stream);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
multipath-tools-0.11.1/libmultipath/valid.c:208:34: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&mountinfo, "r")’
multipath-tools-0.11.1/libmultipath/valid.c:294:1: enter_function: entry to ‘is_path_valid’
multipath-tools-0.11.1/libmultipath/valid.c:301:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:304:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:308:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:308:13: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:311:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:317:12: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:329:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:332:16: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:333:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:337:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:339:17: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:339:17: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:342:13: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:342:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:345:28: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:346:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:352:14: branch_false: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:352:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/libmultipath/valid.c:354:13: branch_true: ...to here
multipath-tools-0.11.1/libmultipath/valid.c:354:13: call_function: calling ‘is_device_in_use’ from ‘is_path_valid’
#  206|   		pthread_cleanup_push(cleanup_cache, cache);
#  207|   		if (mnt_table_set_cache(tbl, cache) == 0) {
#  208|-> 			stream = fopen(mountinfo, "r");
#  209|   			if (stream != NULL) {
#  210|   				pthread_cleanup_push(cleanup_fclose, stream);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def73]
multipath-tools-0.11.1/multipathd/fpin_handlers.c:508:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘els_marginal_list_head.next + -2056’
multipath-tools-0.11.1/multipathd/fpin_handlers.c:576:13: enter_function: entry to ‘receiver_cleanup_list’
multipath-tools-0.11.1/multipathd/fpin_handlers.c:579:9: call_function: calling ‘fpin_clean_els_marginal_list’ from ‘receiver_cleanup_list’
#  506|   					     node);
#  507|   		list_del(&els_marg->node);
#  508|-> 		free(els_marg);
#  509|   	}
#  510|   }

Error: GCC_ANALYZER_WARNING: [#def74]
multipath-tools-0.11.1/multipathd/fpin_handlers.c:624:23: warning[-Wanalyzer-fd-use-without-check]: ‘read’ on possibly invalid file descriptor ‘fd’
multipath-tools-0.11.1/multipathd/fpin_handlers.c:605:14: acquire_resource: datagram socket created here
multipath-tools-0.11.1/multipathd/fpin_handlers.c:606:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/fpin_handlers.c:611:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/fpin_handlers.c:616:12: branch_false: following ‘false’ branch (when ‘ret != -1’)...
 branch_false: ...to here
multipath-tools-0.11.1/multipathd/fpin_handlers.c:624:23: danger: ‘fd’ could be invalid
#  622|   
#  623|   		condlog(4, "Waiting for ELS...\n");
#  624|-> 		ret = read(fd, buf, DEF_RX_BUF_SIZE);
#  625|   		if (ret < 0) {
#  626|   			condlog(0, "failed to read the els frame (%d)", ret);

Error: GCC_ANALYZER_WARNING (CWE-688): [#def75]
multipath-tools-0.11.1/multipathd/main.c:3286:21: warning[-Wanalyzer-null-argument]: use of NULL ‘new’ where non-null expected
multipath-tools-0.11.1/multipathd/main.c:3293:13: enter_function: entry to ‘reconfigure_check’
multipath-tools-0.11.1/multipathd/main.c:3298:12: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/multipathd/main.c:3300:17: branch_true: ...to here
multipath-tools-0.11.1/multipathd/main.c:3306:13: call_function: calling ‘reconfigure_check_uid_attrs’ from ‘reconfigure_check’
# 3284|   		char *new = VECTOR_SLOT(new_attrs, i);
# 3285|   
# 3286|-> 		if (strcmp(old, new))
# 3287|   			return true;
# 3288|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def76]
multipath-tools-0.11.1/multipathd/main.c:3966:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open("/dev/null", 2)’
multipath-tools-0.11.1/multipathd/main.c:3949:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.11.1/multipathd/main.c:3956:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3966:23: acquire_resource: opened here
multipath-tools-0.11.1/multipathd/main.c:3966:23: danger: ‘open("/dev/null", 2)’ leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 3964|   		fprintf(stderr, "cannot chdir to '/', continuing\n");
# 3965|   
# 3966|-> 	dev_null_fd = open("/dev/null", O_RDWR);
# 3967|   	if (dev_null_fd < 0){
# 3968|   		fprintf(stderr, "cannot open /dev/null for input & output : %s\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def77]
multipath-tools-0.11.1/multipathd/main.c:3973:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 0)’
multipath-tools-0.11.1/multipathd/main.c:3949:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.11.1/multipathd/main.c:3956:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3967:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3973:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3973:13: acquire_resource: opened here
multipath-tools-0.11.1/multipathd/main.c:3973:12: danger: ‘dup2(open("/dev/null", 2), 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
# 3971|   	}
# 3972|   
# 3973|-> 	if (dup2(dev_null_fd, STDIN_FILENO) < 0) {
# 3974|   		fprintf(stderr, "cannot dup2 /dev/null to stdin : %s\n",
# 3975|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def78]
multipath-tools-0.11.1/multipathd/main.c:3978:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 1)’
multipath-tools-0.11.1/multipathd/main.c:3949:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.11.1/multipathd/main.c:3956:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3967:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3973:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3973:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3978:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3978:13: acquire_resource: opened here
multipath-tools-0.11.1/multipathd/main.c:3978:12: danger: ‘dup2(open("/dev/null", 2), 1)’ leaks here; was opened at [(9)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/8)
# 3976|   		_exit(0);
# 3977|   	}
# 3978|-> 	if (dup2(dev_null_fd, STDOUT_FILENO) < 0) {
# 3979|   		fprintf(stderr, "cannot dup2 /dev/null to stdout : %s\n",
# 3980|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def79]
multipath-tools-0.11.1/multipathd/main.c:3983:12: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(open("/dev/null", 2), 2)’
multipath-tools-0.11.1/multipathd/main.c:3949:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.11.1/multipathd/main.c:3956:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3967:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3973:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3973:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3978:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3978:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3983:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3983:13: acquire_resource: opened here
multipath-tools-0.11.1/multipathd/main.c:3983:12: danger: ‘dup2(open("/dev/null", 2), 2)’ leaks here; was opened at [(11)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/10)
# 3981|   		_exit(0);
# 3982|   	}
# 3983|-> 	if (dup2(dev_null_fd, STDERR_FILENO) < 0) {
# 3984|   		fprintf(stderr, "cannot dup /dev/null to stderr : %s\n",
# 3985|   			strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-775): [#def80]
multipath-tools-0.11.1/multipathd/main.c:3990:1: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dev_null_fd’
multipath-tools-0.11.1/multipathd/main.c:3949:11: branch_false: following ‘false’ branch (when ‘pid >= 0’)...
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3953:17: branch_false: following ‘false’ branch (when ‘pid == 0’)...
multipath-tools-0.11.1/multipathd/main.c:3956:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3966:23: acquire_resource: opened here
multipath-tools-0.11.1/multipathd/main.c:3967:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3973:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3973:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3978:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3978:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3983:13: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3983:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/main.c:3988:22: branch_false: ...to here
multipath-tools-0.11.1/multipathd/main.c:3990:1: danger: ‘dev_null_fd’ leaks here; was opened at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 3988|   	daemon_pid = getpid();
# 3989|   	return 0;
# 3990|-> }
# 3991|   
# 3992|   int

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
multipath-tools-0.11.1/multipathd/multipathc.c:97:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kw’
multipath-tools-0.11.1/multipathd/multipathc.c:53:12: branch_true: following ‘true’ branch (when ‘state == 0’)...
multipath-tools-0.11.1/multipathd/multipathc.c:55:27: branch_true: ...to here
multipath-tools-0.11.1/multipathd/multipathc.c:69:20: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/multipathc.c:91:20: branch_true: following ‘true’ branch...
multipath-tools-0.11.1/multipathd/multipathc.c:92:30: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/multipathc.c:97:30: branch_false: ...to here
multipath-tools-0.11.1/multipathd/multipathc.c:97:30: danger: dereference of NULL ‘kw’
#   95|   			 * parameter, not the keyword. Don't delete it.
#   96|   			 */
#   97|-> 			if (!kw->param) {
#   98|   				free_key(kw);
#   99|   				vector_del_slot(v, VECTOR_SIZE(v) - 1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def82]
multipath-tools-0.11.1/multipathd/uxlsnr.c:513:44: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘kw’
multipath-tools-0.11.1/multipathd/uxlsnr.c:603:13: enter_function: entry to ‘handle_client’
multipath-tools-0.11.1/multipathd/uxlsnr.c:605:12: branch_false: following ‘false’ branch...
multipath-tools-0.11.1/multipathd/uxlsnr.c:610:9: branch_false: ...to here
multipath-tools-0.11.1/multipathd/uxlsnr.c:611:16: call_function: calling ‘client_state_machine’ from ‘handle_client’
#  511|   			struct key *kw = VECTOR_SLOT(c->cmdvec, 0);
#  512|   
#  513|-> 			if (!c->is_root && kw->code != VRB_LIST) {
#  514|   				c->error = -EPERM;
#  515|   				condlog(0, "%s: cli[%d]: unauthorized cmd \"%s\"",

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-24.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-namedevice-mapper-multipath-0.11.1-1.fc43
store-results-to/tmp/tmpuyqon8st/device-mapper-multipath-0.11.1-1.fc43.tar.xz
time-created2025-04-25 12:21:17
time-finished2025-04-25 12:22:58
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpuyqon8st/device-mapper-multipath-0.11.1-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpuyqon8st/device-mapper-multipath-0.11.1-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9