]> git.ipfire.org Git - thirdparty/strongswan.git/commit
ivgen: Allow reusing the same message ID twice in sequential IV gen
authorMartin Willi <martin@revosec.ch>
Tue, 2 Jun 2015 12:08:42 +0000 (14:08 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 5 Jun 2015 11:44:42 +0000 (13:44 +0200)
commitb756eea4f48960eb788634d89dcab9881edc41b9
treebaca4ad750434a4f8153476db6bd98fb2b287d2c
parent9bb7307825f73ad9159bd07258f002c8cacebb8c
ivgen: Allow reusing the same message ID twice in sequential IV gen

We use the message ID and fragment number as IV generator. As IKEv2 uses
distinct message ID counters for actively and passively initiated exchanges,
each IV would be used twice. As we explicitly reject such message IDs since
d0ed1079, original-responder initiated exchanges fail with counter mode ciphers.

This commit separates IV space in two halves for sequential IVs, and
automatically assigns once reused sequence numbers to the second half.

Fixes #980.
src/libstrongswan/crypto/iv/iv_gen_seq.c