xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)
authorAntony Antony <antony@phenome.org>
Thu, 7 Dec 2017 20:54:27 +0000 (21:54 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 May 2018 08:27:00 +0000 (10:27 +0200)
commit3e54e1c3beecce02cf1256eabb8f71f1414be3aa
tree5ee126f1a87af1ae62f239cf9691b30742fef588
parent81da9f87ad9d5b77014f0d11946ffbc887bdec70
xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM)

commit 75bf50f4aaa1c78d769d854ab3d975884909e4fb 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>
net/xfrm/xfrm_state.c