提交 75bf50f4 编写于 作者: A Antony Antony 提交者: Steffen Klassert

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: NAntony Antony <antony@phenome.org>
Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
上级 ddc47e44
...@@ -1344,6 +1344,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig, ...@@ -1344,6 +1344,7 @@ static struct xfrm_state *xfrm_state_clone(struct xfrm_state *orig,
if (orig->aead) { if (orig->aead) {
x->aead = xfrm_algo_aead_clone(orig->aead); x->aead = xfrm_algo_aead_clone(orig->aead);
x->geniv = orig->geniv;
if (!x->aead) if (!x->aead)
goto error; goto error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册