View Single Post
Author Message
ekshon
Junior Member
Join Date: Nov 2020
Old 11-08-2020 , 11:56   [ANY/CSGO] cutlrbtree overflow, memory access
Reply With Quote #1

Following this tweet https://twitter.com/ZooL_Smith/statu...23189960478720 (all credits to ZooL) we have a knowledge why "CUtlRBTree overflow" crash happens. Every new unique string created (also every new entity) being added to a string pool which has a limit = 65536.

Please, don't ask "why you even need this?". This string pool is bugged because it's not purging itself on new round, which cause server crash after 1-2 hours of playing on some gamemodes.

IS IT POSSIBLE to get access to these strings and kill only those, which are lost their relevance?

There's a command which allows you to output all the strings - "dumpgamestringtable". If you search it on hl2 source code files, you can find "CGameStringPool" class:
https://github.com/ValveSoftware/sou...stringpool.cpp

Can we get an access to "m_Strings" of NON-entity class though the sourcemod, or maybe memory hack?

UPD:
In csgo's source code: https://github.com/perilouswithadoll...stringpool.cpp
we have this function:
Quote:
void CStringPool::FreeAll()
{
unsigned short i = m_Strings.FirstInorder();
while ( i != m_Strings.InvalidIndex() )
{
free( (void *)m_Strings[i] );
i = m_Strings.NextInorder(i);
}
m_Strings.RemoveAll();
}
This means it's possible to call it using "SDKCall", if you know the offset, am I right?

Last edited by ekshon; 11-08-2020 at 17:43. Reason: update
ekshon is offline