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] [thread-next>] [day] [month] [year] [list]
Message-ID: <44b4e841067034f937f80869f967c7882d162452.camel@axis.com>
Date:   Fri, 20 Oct 2023 08:32:59 +0000
From:   Vincent Whitchurch <Vincent.Whitchurch@...s.com>
To:     "edumazet@...gle.com" <edumazet@...gle.com>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
        "x86@...nel.org" <x86@...nel.org>,
        "dsahern@...nel.org" <dsahern@...nel.org>,
        "bp@...en8.de" <bp@...en8.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "gus@...a.com" <gus@...a.com>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "viro@....linux.org.uk" <viro@....linux.org.uk>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>
Subject: Re: AW: [PATCH] amd64: Fix csum_partial_copy_generic()

On Thu, 2023-10-19 at 09:06 +0100, Al Viro wrote:
> diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
> index b8607763d113..6da09157f722 100644
> --- a/net/ipv4/icmp.c
> +++ b/net/ipv4/icmp.c
> @@ -376,6 +376,7 @@ static void icmp_push_reply(struct sock *sk,
>  	} else if ((skb = skb_peek(&sk->sk_write_queue)) != NULL) {
>  		struct icmphdr *icmph = icmp_hdr(skb);
>  		__wsum csum;
> +		__sum16 folded;
>  		struct sk_buff *skb1;
>  
> 
>  		csum = csum_partial_copy_nocheck((void *)&icmp_param->data,
> @@ -384,7 +385,8 @@ static void icmp_push_reply(struct sock *sk,
>  		skb_queue_walk(&sk->sk_write_queue, skb1) {
>  			csum = csum_add(csum, skb1->csum);
>  		}
> -		icmph->checksum = csum_fold(csum);
> +		folded = csum_fold(csum);
> +		icmph->checksum = folded ? folded : CSUM_MANGLED_0;
>  		skb->ip_summed = CHECKSUM_NONE;
>  		ip_push_pending_frames(sk, fl4);
>  	}

32-bit ARM is also affected since commit 1d60be3c25edf4b95 ("arm:
propagate the calling convention changes down to
csum_partial_copy_from_user()").

While the above fixes the ICMP reply case, are there other callers that
also need similar changes?  For example, I see net/sched/act_csum.c also
calculating ICMP checksums?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ