From c07658825fb3425b7629c8b5dbfaa9d8414f8322 Mon Sep 17 00:00:00 2001 From: MDIC Date: Mon, 25 Jul 2022 14:12:51 -0400 Subject: [PATCH] update (module): Dereferencing NULL Exploit fix So there is a "Dereferencing NULL" Exploit that will crash the server thru the anticheat module. That issue is now fixed. I will not be releasing details of that exploit. Just make sure the module is updated and you will not have that problem. Appears to only effect Azerothcore, the TC counter part is not affected. --- src/AnticheatMgr.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 5702a67..8279b0a 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -45,6 +45,7 @@ enum Spells AnticheatMgr::AnticheatMgr() { + uint32 _alertFrequency = 0; } AnticheatMgr::~AnticheatMgr() @@ -169,6 +170,13 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem if (!sConfigMgr->GetOption("Anticheat.DetectTelePlaneHack", true)) return; + //Celestial Planetarium Observer Battle has a narrow path that false flags + if (player && GetWMOAreaTableEntryByTripple(5202, 0, 24083)) + return; + + if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST)) + return; + ObjectGuid key = player->GetGUID(); uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); @@ -178,13 +186,6 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem if (!distance2D) return; - //Celestial Planetarium Observer Battle has a narrow path that false flags - if (player && GetWMOAreaTableEntryByTripple(5202, 0, 24083)) - return; - - if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST)) - return; - if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP) return; @@ -287,8 +288,6 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) if (!sConfigMgr->GetOption("Anticheat.DetectZaxisHack", true)) return; - ObjectGuid key = player->GetGUID(); - // If he is flying we dont need to check if (movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING)) return; @@ -307,6 +306,8 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) if (player->GetLiquidData().Status == LIQUID_MAP_ABOVE_WATER) return; + ObjectGuid key = player->GetGUID(); + uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); // We don't need to check for a ignore z if the player hasn't moved