Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1908553imm; Thu, 24 May 2018 02:44:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrBYa1p8t/3x4L/1a6RLMfzsVmlgfz74toZz7WvSQ/Wh/yOQAqmhKrxswAWGArMpQwPcOOF X-Received: by 2002:a63:78c3:: with SMTP id t186-v6mr5133275pgc.93.1527155087782; Thu, 24 May 2018 02:44:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527155087; cv=none; d=google.com; s=arc-20160816; b=NFlgSUoQ5EqRjRb/D+Hx0LB54Rf+Deovx3MgoSyIO6044rJtB2+LD2WfhqJy/tl9// bzc4whu7M7cZk17/y/mXSipyleCb7BgoOQs0jyjcILOrZC2EtSvvu3z7h25KoBHJTPtx eHf2+d86xsmmIyQwZ//kL//1kJW2ThUkPVoyPQT4a1kuUHF+LMFhe4oX7OXQ6DfOd+5A JXzLW6BCV3HJXYDoAZhPYI0ozx6ho4f2oFgPaMC+bdfRwUURP/11WuDRouzDsNrofaBC CD+PlGY7DqOyKQTUL00pWSEiQwHNmIJtm3P4JvzB1DvlTTz7MWkOlgWH4mXFScpaaxTM 0NZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QVj4dMIRGfx5U0YFAagM8FiFtRtDhahRQ9AKqwHhuSk=; b=V4wipljytjYY2byp7XhcJ/wac9U7E0YIoP5DwmQJwLj2DPW4IpA7zfuCu2etLPLQva z5bt/h4RZoAj5mbgzEwvhM9iOFSddcGLcKOWlMPK6Yt/UHkTzY45YsLcLTj2bDnkmkXU 7rrMbtciS+JbU2WzKSMuInRP4vuW9N0kiF0Ku0WPTzeNgTS/u4V83h0qgW7astb+FeNC btewc/Mex93FOgkgbN9UIzEjtN4e68V2BeEYWQGQDgdEy0SlhR6z0SdqFj8imcZW0ZVu laEaJ5NmqgZnv+BNTSiWByD8OhLxsLfiSzwA7/g9gBACOC1VLEF6UttlDc7O5Y0r49D+ DrdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ko8TU2q/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m29-v6si2665144pgc.232.2018.05.24.02.44.33; Thu, 24 May 2018 02:44:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ko8TU2q/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966550AbeEXJny (ORCPT + 99 others); Thu, 24 May 2018 05:43:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:55170 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966154AbeEXJnm (ORCPT ); Thu, 24 May 2018 05:43:42 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7B8DA2089F; Thu, 24 May 2018 09:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527155022; bh=YbgYMb7uzoi8z2W0+HDCL4JDU6NNm0AE3ib7RxfZD3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ko8TU2q/d3AHPs2zJdAYbR1MfmtWbPQL6bwxWoBq3lXoObTez/yXsn6IBMVQWpjrF Mu86aD5znv9vQUgcwGQYu8bVOKcpsNKVEZ3T7HI+ghudlunOCbQ/9Hu9F5CUUayw6i bu3iLjrZv5HtNNdd7XyRnGFzWTtx45f6cpYdX80k= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Antony Antony , Steffen Klassert , Ben Hutchings Subject: [PATCH 4.4 26/92] xfrm: fix xfrm_do_migrate() with AEAD e.g(AES-GCM) Date: Thu, 24 May 2018 11:38:03 +0200 Message-Id: <20180524093201.478863463@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180524093159.286472249@linuxfoundation.org> References: <20180524093159.286472249@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Antony Antony 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 Signed-off-by: Steffen Klassert Cc: Ben Hutchings Signed-off-by: Greg Kroah-Hartman --- net/xfrm/xfrm_state.c | 1 + 1 file changed, 1 insertion(+) --- a/net/xfrm/xfrm_state.c +++ b/net/xfrm/xfrm_state.c @@ -1159,6 +1159,7 @@ static struct xfrm_state *xfrm_state_clo if (orig->aead) { x->aead = xfrm_algo_aead_clone(orig->aead); + x->geniv = orig->geniv; if (!x->aead) goto error; }