From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1C1BC77B76 for ; Mon, 17 Apr 2023 17:51:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229784AbjDQRvP (ORCPT ); Mon, 17 Apr 2023 13:51:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45864 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjDQRvP (ORCPT ); Mon, 17 Apr 2023 13:51:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2381FC3 for ; Mon, 17 Apr 2023 10:51:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B3311628DB for ; Mon, 17 Apr 2023 17:51:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 559FFC433EF; Mon, 17 Apr 2023 17:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1681753872; bh=eA/Pmv5a2ma7V4BCaBPliTqL+YWPU3cTmWdQCfrbjqc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=a2CCPjXPhg71SF/nSbQriwEh157TiYTmTPtRcYUrcCoRklE/FwrRD9TinsG0kp6Sj 2VCqzbbVECNRJUtAKO57M66Ud8m5+iKoHqJ3qviWX1BNTXkaFH6JdcY9FK5/qn4JMr aMa1WSMnJlgqiKzLCj/WGg7ifyX+lKvBlqsicuqGsnoCrjUgukk5OQc4v642ngLSbK tZRYkAm3zzabqjUOqjwq1YCAIoJc27H7o22l/Et5dKJRH4zsajmVXGLKOSFETVoOCN LqlWdjpkBuAqOZ5fObOjff9AbPCXujbcaiE9fxhLDIO8yX9NeJ5aRLIRAE2y/EUQZF d6SIxnnkndLyg== Message-ID: Date: Mon, 17 Apr 2023 11:51:11 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCHv2 net] net: rpl: fix rpl header size calculation Content-Language: en-US To: Alexander Aring , netdev@vger.kernel.org Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alex.aring@gmail.com, daniel@iogearbox.net, ymittal@redhat.com, mcascell@redhat.com, torvalds@linuxfoundation.org, mcr@sandelman.ca References: <20230417130052.2316819-1-aahringo@redhat.com> From: David Ahern In-Reply-To: <20230417130052.2316819-1-aahringo@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 4/17/23 7:00 AM, Alexander Aring wrote: > This patch fixes a missing 8 byte for the header size calculation. The > ipv6_rpl_srh_size() is used to check a skb_pull() on skb->data which > points to skb_transport_header(). Currently we only check on the > calculated addresses fields using CmprI and CmprE fields, see: > > https://www.rfc-editor.org/rfc/rfc6554#section-3 > > there is however a missing 8 byte inside the calculation which stands > for the fields before the addresses field. Those 8 bytes are represented > by sizeof(struct ipv6_rpl_sr_hdr) expression. > > Fixes: 8610c7c6e3bd ("net: ipv6: add support for rpl sr exthdr") > Signed-off-by: Alexander Aring > --- > changes since v2: > - use sizeof(struct ipv6_rpl_sr_hdr) instead of hardcoded 8 > > net/ipv6/rpl.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > Reviewed-by: David Ahern