CVE-2016-15024 (Other, published 2023-02-19T18:15Z)
Description: value: A vulnerability was found in doomsider shadow. It has been classified as problematic. Affected is an unknown function. The manipulation leads to denial of service. Attacking locally is a requirement. The complexity of an attack is rather high. The exploitability is told to be difficult. Continious delivery with rolling releases is used by this product. Therefore, no version details of affected nor updated releases are available. The patch is identified as 3332c5ba9ec3014ddc74e2147190a050eee97bc0. It is recommended to apply a patch to fix this issue. VDB-221478 is the identifier assigned to this vulnerability.
Severity: nan (CVSS v3 base score: 5.5)
Weakness: NVD-CWE-noinfo \u2014 Insufficient Information
There is insufficient information about the issue to classify it; details are unkown or unspecified.
Repository: https://github.com/doomsider/shadow
Files changed:
core/core_loops.dtsd
modules/chatfunctions.dtsd
Commit message: Fixed possible exploit, improved existing code

Removed possibility for certain special characters to cause the script
to crash.  Made the chat command function more simple.  Removed use of
eval because it did basically nothing


Vulnerable code:
			COMMANDARRAY=0
			while [ -n "${RECIEVEDCOMMAND[$COMMANDARRAY]+set}" ]
				RECIEVEDCOMMAND=${RECIEVEDCOMMAND[$COMMANDARRAY]}
				eval $RECIEVEDCOMMAND '$RECIEVEDPARAMETER'
				let COMMANDARRAY++
	echo "This was sent to chat log $@"
	echo "This was the message $MESSAGESTRING"
	echo "This was sender $SENDERNAME"
	echo "This was receiver $RECEIVERNAME"
	echo "This was receivertype $RECEIVERTYPE"
		echo "List of chat commands $CHATCOMMANDS[@]"
		CHATCOMMANDARRAY=0
        COMMANDFOUND=false
		while [ -n "${CHATCOMMANDS[$CHATCOMMANDARRAY]+set}" ] 
		do
            CURRENTCHATCOMMAND=${CHATCOMMANDS[$CHATCOMMANDARRAY]}
#		echo "This is the current Chat Command $CURRENTCHATCOMMAND"
            CUTCHATCOMMAND=${CURRENTCHATCOMMAND#*_}
#		echo "This remove chatcommand to get only the command name $CUTCHATCOMMAND"
            if [ "$CUTCHATCOMMAND" = "$USERCOMMAND" ]
                echo "Chat Command found"
                COMMANDFOUND=true
                if check_player_rank_allowed $USERCOMMAND $SENDERNAME
                then
                    eval $CURRENTCHATCOMMAND "$SENDERNAME" $USERPARAMETERS
                else
                    echo "Command not authorized"
                    lib_screensend $CONFIGDTSD_MAINSCREEN /pm $SENDERNAME "You do not have permission to use that command!"
                fi
                let CHATCOMMANDARRAY++
                let CHATCOMMANDARRAY++
            fi
		done
		if [ $COMMANDFOUND = false ]
        then
            lib_screensend $CONFIGDTSD_MAINSCREEN /pm $SENDERNAME "Unknown command. Please use !HELP for a list of the commands you can use"
        fi

Fixed code:
			POSITIONCOMMANDARRAY=0
			while [ -n "${RECIEVEDCOMMAND[$POSITIONCOMMANDARRAY]+set}" ]
				RECIEVEDCOMMAND=${RECIEVEDCOMMAND[$POSITIONCOMMANDARRAY]}
				$RECIEVEDCOMMAND ${RECIEVEDPARAMETER}
				let POSITIONCOMMANDARRAY++
# Trap is used here to restart logloop if it exits due to a bad call
# trap core_logloop EXIT
	#echo "This was sent to chat log $@"
	#echo "This was the message $MESSAGESTRING"
	#echo "This was sender $SENDERNAME"
	#echo "This was receiver $RECEIVERNAME"
	#echo "This was receivertype $RECEIVERTYPE"
		USERCOMMAND="chatcommand_$USERCOMMAND"
		#echo "List of chat commands ${CHATCOMMANDS[@]}"
		if lib_arraycontains CHATCOMMANDS $USERCOMMAND
		then 
			echo "Chat command found"
		    USERCOMMAND=${USERCOMMAND#*_}
			if check_player_rank_allowed $USERCOMMAND $SENDERNAME
				USERCOMMAND="chatcommand_$USERCOMMAND"
				$USERCOMMAND "$SENDERNAME" $USERPARAMETERS
				echo "Command not authorized"
				lib_screensend $CONFIGDTSD_MAINSCREEN /pm $SENDERNAME "You do not have permission to use that command!"
			fi
        
		else
			echo "No matching chat command"
			lib_screensend $CONFIGDTSD_MAINSCREEN /pm $SENDERNAME "Unknown command. Please use !HELP for a list of the commands you can use"
		fi