antirez / freakwan

A floor-routing WAN implementing a chat over bare-LoRa (no LoRaWAN).
BSD 2-Clause "Simplified" License
382 stars 18 forks source link

Isn't this trivial to DOS? #8

Open Captain-Of-Coit opened 1 year ago

Captain-Of-Coit commented 1 year ago

FreakWAN implementations are required to implement Listen Before Talk, in order to avoid sending messages if they detect some other valid LoRa transmission (either about FreakWAN or not) currently active. In this implementation, this feature is accomplished by reading the LoRa radio status register and avoiding transmitting if the set of bits reports an incoming packet being received.

LBT is a fundamental improvement for the performance of this protocol, since a major issue with this kind of routing, where every packet is sent and then relayed to everybody on the same frequency, is packet collisions.

I'm asking solely based on the information in the README without looking into the code further, so forgive me if I get it wrong.

It seems based on the description that anyone with a long-range LoRa antenna could transmit junk data in order to take down the network in the surrounding physical location. Maybe it doesn't matter that much, but if I understand LoRa correctly, with good line-of-sight, one could reach quite far, therefore taking out large swaths of the network, on at least a local level.

fallous commented 1 year ago

I actually think it may be worse than your example (intentional sabotage). It seems that based on the description of LBT that the network itself could self-DOS in situations where there are a large number of units within proximity being used. If the idea is to be useful as a fallback communications system in case of some sort of natural disaster that disables cell or wifi networks then densely populated cities could cause saturation, especially if messages are relaying to reach users outside of the city.

Perhaps one potential solution would be to have an RSSI window that starts wide but begins narrowing upon detection of severe congestion until congestion is reduced to a useful level. Of course there may be a potential hidden race condition within such a solution.

seclorum commented 6 months ago

valid LoRa transmission

I think it hinges on the definition of this abstraction, and I would say that the DOS issue has to be mitigated by all layers, and thus this is a fair-weather imposition.

But also it has to be noted that .. as usual, physical access roots all the things.