Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)

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>

authored by

Antony Antony and committed by
Steffen Klassert
75bf50f4 ddc47e44

+1
+1
net/xfrm/xfrm_state.c
··· 1344 1344 1345 1345 if (orig->aead) { 1346 1346 x->aead = xfrm_algo_aead_clone(orig->aead); 1347 + x->geniv = orig->geniv; 1347 1348 if (!x->aead) 1348 1349 goto error; 1349 1350 }