Mojira Archive
BDS-19346

Empty UDP packets cause server crash

On the windows 10 BDS (this may effect other versions too) a crash can happen when a large amount of empty UDP packets hit the server.

The log "ATTENTION! Received EMPTY UDP packet - potential UDP ports scanning." will happen every time an empty UDP packet is sent. This can be exploited to crash the server by just throwing large amounts of empty packets at the server.

 

Details:

The Log message is sent via a printf call which is considered unsafe in the moder world.

My guess is to why this happens is that it takes a while to print in general, The packet thread is paused while this happens and a race condition.

The location of the call is in RakNetSocket2.cpp in the deps tree of the MCBE codebase (this effects normal clients afaik).

The function is "RakNet::RNS2_Berkley::RecvFromLoopInt". Only know this due to symbols being in the BDS. So reporting on these bugs may become harder

Fix:

To fix this all you have to do is remove this log and it drastically helps. This cant be fully fixed like that but it drops the performance tank that  happens when this attack happens.

 

Recreation:

A simple test is start a BDS instance and make a simple script/app to send as many UDP packets as you can to the server and it should crash quite quickly

 

Showcase:
I will attach below a video of it working and the script used to perform it

Environment

Windows Version 10.0.19045 Build 19045

Linked Issues

Attachments2

crash.py

DuckosM0ds

Comments2

MEQS_KEEP_PRIVATE

Plausible due to explanation of the issue

History16

DuckosM0ds

Changed description:

On the windows 10 BDS (this may effect other versions too) a crash can happen when a large amount of empty UDP packets hit the server.

0

The log "ATTENTION! Received EMPTY UDP packet - potential UDP ports scanning." will happen every time an empty UDP packet is sent. This can be exploited to crash the server by just throwing large amounts of empty packets at the server.

0

 

0

Details:

0

The Log message is sent via a printf call which is considered unsafe in the moder world.

0

My guess is to why this happens is that it takes a while to print in general, The packet thread is paused while this happens and a race condition.

0

The location of the call is in RakNetSocket2.cpp in the deps tree of the MCBE codebase (this effects normal clients afaik)

0

Fix:

0

To fix this all you have to do is remove this log and it drastically helps. This cant be fully fixed like that but it drops the performance tank that  happens when this attack happens.

0

 

0

Recreation:

0

A simple test is start a BDS instance and make a simple script/app to send as many UDP packets as you can to the server and it should crash quite quickly

DuckosM0ds

Added attachment: ApplicationFrameHost_ymHeHRY1Og.mp4

DuckosM0ds

Removed attachment: ApplicationFrameHost_ymHeHRY1Og.mp4

DuckosM0ds

Added attachment:

Added attachment:

Changed description:

On the windows 10 BDS (this may effect other versions too) a crash can happen when a large amount of empty UDP packets hit the server.

0

The log "ATTENTION! Received EMPTY UDP packet - potential UDP ports scanning." will happen every time an empty UDP packet is sent. This can be exploited to crash the server by just throwing large amounts of empty packets at the server.

0

 

0

Details:

0

The Log message is sent via a printf call which is considered unsafe in the moder world.

0

My guess is to why this happens is that it takes a while to print in general, The packet thread is paused while this happens and a race condition.

0

The location of the call is in RakNetSocket2.cpp in the deps tree of the MCBE codebase (this effects normal clients afaik)

0

Fix:

0

To fix this all you have to do is remove this log and it drastically helps. This cant be fully fixed like that but it drops the performance tank that  happens when this attack happens.

0

 

0

Recreation:

0

A simple test is start a BDS instance and make a simple script/app to send as many UDP packets as you can to the server and it should crash quite quickly

0

 

0

Showcase:
0I will attach below a video of it working and the script used to perform it

[Mod] OcelotOnesie

Added Security Level: Minecraft - Private

DuckosM0ds

Changed description:

On the windows 10 BDS (this may effect other versions too) a crash can happen when a large amount of empty UDP packets hit the server.

0

The log "ATTENTION! Received EMPTY UDP packet - potential UDP ports scanning." will happen every time an empty UDP packet is sent. This can be exploited to crash the server by just throwing large amounts of empty packets at the server.

0

 

0

Details:

0

The Log message is sent via a printf call which is considered unsafe in the moder world.

0

My guess is to why this happens is that it takes a while to print in general, The packet thread is paused while this happens and a race condition.

0

The location of the call is in RakNetSocket2.cpp in the deps tree of the MCBE codebase (this effects normal clients afaik).

0

The function is "RakNet::RNS2_Berkley::RecvFromLoopInt". Only know this due to symbols being in the BDS. So reporting on these bugs may become harder

0

Fix:

0

To fix this all you have to do is remove this log and it drastically helps. This cant be fully fixed like that but it drops the performance tank that  happens when this attack happens.

0

 

0

Recreation:

0

A simple test is start a BDS instance and make a simple script/app to send as many UDP packets as you can to the server and it should crash quite quickly

0

 

0

Showcase:
0I will attach below a video of it working and the script used to perform it

[Mod] Greymagic27

Confirmation Status: UnconfirmedPlausible

[Mod] OcelotOnesie

Added is duplicated by link:
BDS-19350Freezing BDSDuplicate

[Mod] OcelotOnesie

Confirmation Status: PlausibleCommunity Consensus

Changed summary:
Empty UDP packets cause server crash.

[MCQA] v-weszaj
[Bot] Arisa

Added affects versions: 1.21.1

[Mod] Greymagic27

Resolution: UnresolvedFixed

[Mod] Jarl-Penguin

Added affects versions: 1.21.20

Fixed
DuckosM0ds
0
1
Community Consensus
1250805
1.20.81 1.21.1
1.21.20