lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YBVy1kNl5joCU2Xb@kroah.com>
Date:   Sat, 30 Jan 2021 15:53:10 +0100
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Aviraj CJ <acj@...co.com>
Cc:     davem@...emloft.net, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        xe-linux-external@...co.com, Hangbin Liu <liuhangbin@...il.com>,
        Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH stable v5.4 2/2] IPv6: reply ICMP error if the first
 fragment don't include all headers

On Sat, Jan 30, 2021 at 05:24:52PM +0530, Aviraj CJ wrote:
> From: Hangbin Liu <liuhangbin@...il.com>
> 
> commit 2efdaaaf883a143061296467913c01aa1ff4b3ce upstream.
> 
> Based on RFC 8200, Section 4.5 Fragment Header:
> 
>   -  If the first fragment does not include all headers through an
>      Upper-Layer header, then that fragment should be discarded and
>      an ICMP Parameter Problem, Code 3, message should be sent to
>      the source of the fragment, with the Pointer field set to zero.
> 
> Checking each packet header in IPv6 fast path will have performance impact,
> so I put the checking in ipv6_frag_rcv().
> 
> As the packet may be any kind of L4 protocol, I only checked some common
> protocols' header length and handle others by (offset + 1) > skb->len.
> Also use !(frag_off & htons(IP6_OFFSET)) to catch atomic fragments
> (fragmented packet with only one fragment).
> 
> When send ICMP error message, if the 1st truncated fragment is ICMP message,
> icmp6_send() will break as is_ineligible() return true. So I added a check
> in is_ineligible() to let fragment packet with nexthdr ICMP but no ICMP header
> return false.
> 
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> Signed-off-by: Aviraj CJ <acj@...co.com>
> ---
>  net/ipv6/icmp.c       |  8 +++++++-
>  net/ipv6/reassembly.c | 33 ++++++++++++++++++++++++++++++++-
>  2 files changed, 39 insertions(+), 2 deletions(-)

Both now queued up, thanks.

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ