Closed hylowaker closed 3 years ago
I'm not sure if this should be implemented.
For the NwkSKey, you should always use a cryptographic random value to avoid the risk you are mentioning. I'm not sure if there is a way where a NS could operate with multiple devices that have both the same DevAddr and NwkSKey, as this combo is used to retrieve the matching device-session based on MIC validation.
If the NS would enforce unique DevAddr + NwkSkey combinations, then the result would be that on duplicate it would prompt the user that a device with the same DevAddr and NwkSkey already exists, which would leak security sensitive data.
If two or more devices share same DevAddr and network session keys, their uplink will map to single session even if they are coming from different nodes, so that the other sessions are not able to receive uplink data.
It would not likely happen in OTAA devices. However user can accidentally or intentionally activate such devices by ABP.
I think the server should not allow activating an ABP device with duplicated DevAddr and network session keys.