Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7780265ybh; Thu, 8 Aug 2019 23:21:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqxkwiLJP4vNPu21iPYypgOBdWbdiQyiwvpYqPLk+Y6I9+I2ycoFq4JEiMrw+I5TWrDk3H9K X-Received: by 2002:a17:902:a514:: with SMTP id s20mr16559204plq.162.1565331703816; Thu, 08 Aug 2019 23:21:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565331703; cv=none; d=google.com; s=arc-20160816; b=m108NJjEE2raWo4f9zoivSYoE5XAh2nQD00k1+Ce5QyZt1ft6DRxVKOKVrvsPslkOl CvUA47Ad17wCpAL8BXvcujZzaMOPULA3xf6fX4VHy6I0jGyXQ+Q1LAJVs6V+8gZm4a6t dZfAFU8uk2RcntQc1Bi5pFJtVV6tTvVx4I+GFDYOImgJIk7/nW/MDk7CS2rSbkiVBU5p reXWoiylFTBr2mLDddPQSG/cNyTXxgrhBot/VM7yVH79nup74svYlFe8m898MuJ00oFr qX4dfkzc1OaAYHEQEiYlW+yCThXoA97CE6okwPx3SJTrW6GlE+89UJXSUR/m4YI58ivF Z9pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=XAu7YcyMOYAjAnRPVp0aQOVwumHWkJBpLLQQAf7vmGY=; b=F6imh53JF8wsM8dWVEduy0PLPzcLI30oEwIyZeMwH820DvO4x/qyDemn4z6bO7wvkE 7l3VqSjTBsAvRhQZeDa45l4dQ2v7u8dsxBYbmLzr8yIZmG5ElZLKrq6oWaOFklqZ/p2t xaxxCT5IetlCn7hBCZdgIzqENSvNmcuGRdV2hWhF0q3o/o4ApuIlc8nQXayb+AIiRQBV BIGYvJHALj9VfmCBLclgnF47Ml4sv0me3nvEC9Mh3dIahvsmoJLaMPkRBsnl05deHHXW Zzx20r06AGWylc2Afo4lfCml7gv7tqPmi/3LapJAMDOfTdo7KwVetlRNua4EGUCswDgA fKZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-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 v23si16617404pgb.496.2019.08.08.23.21.30; Thu, 08 Aug 2019 23:21:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405654AbfHIGUA (ORCPT + 99 others); Fri, 9 Aug 2019 02:20:00 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:37456 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725879AbfHIGUA (ORCPT ); Fri, 9 Aug 2019 02:20:00 -0400 Received: from gondolin.me.apana.org.au ([192.168.0.6] helo=gondolin.hengli.com.au) by fornost.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1hvyFp-0007Or-B3; Fri, 09 Aug 2019 16:19:57 +1000 Received: from herbert by gondolin.hengli.com.au with local (Exim 4.80) (envelope-from ) id 1hvyFo-0002rO-QA; Fri, 09 Aug 2019 16:19:56 +1000 Date: Fri, 9 Aug 2019 16:19:56 +1000 From: Herbert Xu To: Iuliana Prodan Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: Re: [PATCH v5] crypto: gcm - restrict assoclen for rfc4543 Message-ID: <20190809061956.GO10392@gondor.apana.org.au> References: <1564735653-7262-1-git-send-email-iuliana.prodan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1564735653-7262-1-git-send-email-iuliana.prodan@nxp.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Aug 02, 2019 at 11:47:33AM +0300, Iuliana Prodan wrote: > Based on seqiv, IPsec ESP and rfc4543/rfc4106 the assoclen can be 16 or > 20 bytes. > > >From esp4/esp6, assoclen is sizeof IP Header. This includes spi, seq_no > and extended seq_no, that is 8 or 12 bytes. > In seqiv, to asscolen is added the IV size (8 bytes). > Therefore, the assoclen, for rfc4543, should be restricted to 16 or 20 > bytes, as for rfc4106. > > Signed-off-by: Iuliana Prodan > Reviewed-by: Horia Geanta > --- > Changes since v4: > - alignment. > --- > crypto/gcm.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt