Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934822AbcLIQV6 (ORCPT ); Fri, 9 Dec 2016 11:21:58 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:55792 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933393AbcLIQV4 (ORCPT ); Fri, 9 Dec 2016 11:21:56 -0500 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Dumazet , Alexander Duyck , Andrey Konovalov , Arnaldo Carvalho de Melo , Alexander Duyck , "David S. Miller" Subject: [PATCH 4.8 21/45] GSO: Reload iph after pskb_may_pull Date: Fri, 9 Dec 2016 17:20:50 +0100 Message-Id: <20161209161755.814441169@linuxfoundation.org> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161209161754.912203877@linuxfoundation.org> References: <20161209161754.912203877@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: 1127 Lines: 35 4.8-stable review patch. If anyone has any objections, please let me know. ------------------ From: Arnaldo Carvalho de Melo [ Upstream commit a510887824171ad260cc4a2603396c6247fdd091 ] As it may get stale and lead to use after free. Acked-by: Eric Dumazet Cc: Alexander Duyck Cc: Andrey Konovalov Fixes: cbc53e08a793 ("GSO: Add GSO type for fixed IPv4 ID") Signed-off-by: Arnaldo Carvalho de Melo Acked-by: Alexander Duyck Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/af_inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c @@ -1237,7 +1237,7 @@ struct sk_buff *inet_gso_segment(struct fixedid = !!(skb_shinfo(skb)->gso_type & SKB_GSO_TCP_FIXEDID); /* fixed ID is invalid if DF bit is not set */ - if (fixedid && !(iph->frag_off & htons(IP_DF))) + if (fixedid && !(ip_hdr(skb)->frag_off & htons(IP_DF))) goto out; }