-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Different callbacks for esp now multicast messages for better security (IDFGH-6954) #8574
Comments
I found this almost identical issue: espressif/ESP8266_NONOS_SDK#311 |
Has anything happened with this issue? Just noticed the same behaviour today and it's a major security concern. |
@justjustjustus After you |
We want to recieve no broadcast packages at all. Broadcasts are by definition not encrypted and we only want to receive encrypted messeges. |
@zhangyanjiaoesp Yes we still want this for pairing with additional devices. We always use direct connections in combination with broadcasting. |
@justjustjustus We have modify the code to provide more info in the recv callback, but the merge will take some time. If you want to use it now, we can provide a patch to you, when the commit is merged, you can update your IDF then. |
fix in commit 8223a59 |
Problem
On reception of a esp now message, the attached receive callback is called and the message is delivered with sender mac, data pointer and data length.
The problem is that it is not possible to check whether the message comes from a peer that was previously added (with encryption) or from an (unencrypted) broadcasted message.
If added a peer with encryption before, it is not possible to check if the message came encrypted as peer-to-peer message or unencrypted over the broadcast channel.
IMPORTANT: By setting the mac address manually on a sending device, any sender could then send messages with the mac of another device without knowing the encryption keys as long as the recipent has the broadcast peer added before, bypassing the encryption.
Possible Solution
Add another callback for broadcasted messages to be able to differenciate if the message came from a previously added device or was broadcasted to everyone.
Alternative Solutions
Additional context
In our Software, we use esp now heavily. Over broadcasted messages two devices get paired and then switch to an encrypted connection with our own implementation of some kind of TCP. With the broadcast peer constantly enabled, we can not differenciate if the message came from the paired device or from another intruder. With this, an attacker could inflitrate messages in the name of the preveiously paired device without to know the encryption keys that were exchanged during pairing.
The text was updated successfully, but these errors were encountered: