Jump to content

Recommended Posts

  • Active+ Member
Posted (edited)

They're crashing the game by sending randomly sized packets during the handshake/login phase, inflating the buffer size from different connections.

A 65kb buffer is opened for each connection.

m_lpInputBuffer = buffer_new(MAX_INPUT_LEN);

When this buffer is filled with many connections from different designs, the channel reaches its 4gb memory limit and crashes.

The change we made checks the total bytes received from the session during handshake and login (When simulated, the total data flow is 1.25kb max @ Koray <3) and bans the IP if it exceeds the potential data to be received. A host will also get banned if it receives more connections than the limit we set.

Forgotten part: desc.cpp

//Search

    SetPhase(PHASE_HANDSHAKE);

    StartHandshake(_handshake);


// Add above


    {
        desc_event_info* timeout_info = AllocEventInfo<desc_event_info>();
        timeout_info->desc = this;
        m_pkPhaseTimeoutEvent = event_create(phase_timeout_event, timeout_info, PASSES_PER_SEC(DESC_HANDSHAKE_TIMEOUT_SEC));
    }


// Search

m_pInputProcessor = &m_inputMain;


// Add under
event_cancel(&m_pkPhaseTimeoutEvent);
DESC_MANAGER::instance().DecUnauthCount(this);

 

This is the hidden content, please

Alternative download links → Alternate_1 or Alternate_2 or Alternate_3

 

 

Edited by Reached
  • Metin2 Dev 45
  • Flame 2
  • Good 7
  • Love 14
Link to comment
https://metin2.dev/topic/34384-experimental-fix-for-recent-flood-attack/
Share on other sites

Don't use any images from : imgur, turkmmop, freakgamers, inforge, hizliresim... Or your content will be deleted without notice...
Use : https://metin2.download/media/add/

Please use https://metin2.download/ when uploading files smaller than 100MB, otherwise the approval will take longer due to manual upload.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.