On Sat, 2015-05-16 at 21:18 +0300, Emmanuel Grumbach wrote: > I don't get it. I might have misunderstood your previous mail, but I > thought that you were saying the key index was meant to solve this: > the peer could know what key was used based on the key index written > in the frame (I guess it is there somehow) so that the Rx handling > code can know that the jump in the PN is due to a rekeying and not use > any heuristic. I though you meant that the Txing side had a poor > implementation because it reused the same key index before and after > the rekeying which can obviously lead to problems. > Now you seem to say that changing the key index upon rekeying is not > allowed by spec? > What is it good for then? The key index is used for GTK rekeying. The spec makes no provision for seamless PTK rekeying, it's simply not supported. There was/is work in progress to actually change that, but I haven't seen anything definitive. Jouni might know more. > Again - I am just trying to close this bug, not to learn this subject. > I can learn by reading spec / reading code and less by wasting your > time :) As I said, I believe at this point the only way to fix this bug is to try to drop *old* key packets immediately, but it's difficult to ensure this. Effectively, it would require synchronising RX vs. key installation. Using SW crypto will avoid this problem, because as I described in my first email, the only reason (I can think of anyway) is that there's a race between HW decrypt and SW key install. In the case of SW crypto, there's a definitive link between the actual key and the PN because the frame would fail to decrypt (and thus be dropped) if the wrong key was used. The problem only happens in HW crypto with software PN because the two are linked by the key index only. This (entirely untested) patch might also help: http://p.sipsolutions.net/3f082fae8a023bbc.txt johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html