mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)
commit 75bf50f4aa upstream.
copy geniv when cloning the xfrm state.
x->geniv was not copied to the new state and migration would fail.
xfrm_do_migrate
..
xfrm_state_clone()
..
..
esp_init_aead()
crypto_alloc_aead()
crypto_alloc_tfm()
crypto_find_alg() return EAGAIN and failed
Signed-off-by: Antony Antony <antony@phenome.org>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Cc: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
81da9f87ad
commit
3e54e1c3be
@@ -1197,6 +1197,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig)
|
||||
|
||||
if (orig->aead) {
|
||||
x->aead = xfrm_algo_aead_clone(orig->aead);
|
||||
x->geniv = orig->geniv;
|
||||
if (!x->aead)
|
||||
goto error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user