From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] ipv6: sr: fix memory OOB access in seg6_do_srh_encap/inline Date: Mon, 28 May 2018 23:10:25 -0400 (EDT) Message-ID: <20180528.231025.531764810373423405.davem@davemloft.net> References: <20180525122941.21851-1-m.xhonneux@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dlebrun@google.com To: m.xhonneux@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:49118 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932479AbeE2DK1 (ORCPT ); Mon, 28 May 2018 23:10:27 -0400 In-Reply-To: <20180525122941.21851-1-m.xhonneux@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Mathieu Xhonneux Date: Fri, 25 May 2018 13:29:41 +0100 > seg6_do_srh_encap and seg6_do_srh_inline can possibly do an > out-of-bounds access when adding the SRH to the packet. This no longer > happen when expanding the skb not only by the size of the SRH (+ > outer IPv6 header), but also by skb->mac_len. ... > Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels") > Signed-off-by: David Lebrun > Signed-off-by: Mathieu Xhonneux Applied and queued up for -stable.