helium / miner

Miner for the helium blockchain
Apache License 2.0
607 stars 265 forks source link

miner crashes when receiving specific LoRa packets #1347

Open Domain4dmin opened 2 years ago

Domain4dmin commented 2 years ago

The miner crashes when a certain LoRa packet or a pattern is received. Depending on the region this can happen very frequently:

image

Attached is a packet capture from the LoRa packet forwarder (the Helium version) to reproduce the crashes. udp.zip

This was tested with devices from two manufacturers, both show the same issue. There is no OOM problem, one of the hotspots has 8GB RAM (RPi).

This could be abused to let miners within radio distance crash on purpose

Edit: this is likely related: https://github.com/helium/miner/issues/1018

jerryyip commented 2 years ago

Hi @Domain4dmin , why do you think it is a certain lora packet or a pattern that crashes the miner?

Domain4dmin commented 2 years ago

The miner runs fine if the packet forwarder is not started - therefore my conclusion it has to do with the packets the miner receives from the forwarder.

Given that other miners do not crash and I am using the standard software (miner and forwarder) from Helium I believe the crashes happen because of the LoRa packets. Everything else is the same. You can also see that the time when the miner crashes is always the same: every 10 min. 09:00, 09:10, 09:20, etc and then sometimes 2 min later again. there is only 2-3 seconds difference. This can't be because of the packet forwarder, as far as I know it is not sending the time but rather a timestamp which runs over every 2h or so.

As a workaround I tried dropping LoRa packets with a payload larger than 200 bytes and the miner stopped crashing..

@jerryyip: do you see that in other locations too?