Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934372AbcLIQTM (ORCPT ); Fri, 9 Dec 2016 11:19:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55488 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934322AbcLIQTJ (ORCPT ); Fri, 9 Dec 2016 11:19:09 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Brunner , Herbert Xu , Steffen Klassert Subject: [PATCH 4.4 28/28] esp6: Fix integrity verification when ESN are used Date: Fri, 9 Dec 2016 17:18:10 +0100 Message-Id: <20161209161749.155568500@linuxfoundation.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161209161747.923205441@linuxfoundation.org> References: <20161209161747.923205441@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1059 Lines: 33 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Brunner commit a55e23864d381c5a4ef110df94b00b2fe121a70d upstream. When handling inbound packets, the two halves of the sequence number stored on the skb are already in network order. Fixes: 000ae7b2690e ("esp6: Switch to new AEAD interface") Signed-off-by: Tobias Brunner Acked-by: Herbert Xu Signed-off-by: Steffen Klassert Signed-off-by: Greg Kroah-Hartman --- net/ipv6/esp6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -418,7 +418,7 @@ static int esp6_input(struct xfrm_state esph = (void *)skb_push(skb, 4); *seqhi = esph->spi; esph->spi = esph->seq_no; - esph->seq_no = htonl(XFRM_SKB_CB(skb)->seq.input.hi); + esph->seq_no = XFRM_SKB_CB(skb)->seq.input.hi; aead_request_set_callback(req, 0, esp_input_done_esn, skb); }