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: <20211024133807.GA1112319@trnn1532h>
Date:   Sun, 24 Oct 2021 15:38:40 +0200
From:   Cyril Strejc <cyril.strejc@...da.cz>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH] net: multicast: calculate csum of looped-back and
 forwarded packets

On 2021-10-23T22:41:06-0400, Willem de Bruijn wrote:
> >
> > Alternatively, we could solve the CHECKSUM_NONE case by a simple,
> > practical and historical compatible "TX->RX translation" of ip_summed
> > in dev_loopback_xmit(), which keeps CHECKSUM_PARTIAL and leaves
> > __skb_checksum_validate_needed() as is:
> >
> >         if (skb->ip_summed == CHECKSUM_NONE)
> >                 skb->ip_summed = CHECKSUM_UNNECESSARY;
> >
> > or:
> >         if (skb->ip_summed != CHECKSUM_PARTIAL)
> >                 skb->ip_summed = CHECKSUM_UNNECESSARY;
> 
> Based on the idea that these packets are fully checksummed, so even if
> they loop to the tx path again with ip_summed CHECKSUM_UNNECESSARY,
> they will not cause the bug that you originally reported?
> 

It won't cause the bug. The original bug is caused solely by
CHECKSUM_PARTIAL being unconditionally translated to
CHECKSUM_UNNECESSARY in dev_loopback_xmit(). Adding the condition to
keep CHECKSUM_PARTIAL solves the issue.

> Yes, that looks like a nice solution.

I will double-check and send PATCH v2 to this e-mail thread.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ