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]
Date:   Fri, 31 Jan 2020 00:58:00 +0000
From:   Ttttabcd <ttttabcd@...tonmail.com>
To:     Michal Kubecek <mkubecek@...e.cz>
Cc:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        David Miller <davem@...emloft.net>,
        "kuznet@....inr.ac.ru" <kuznet@....inr.ac.ru>,
        "yoshfuji@...ux-ipv6.org" <yoshfuji@...ux-ipv6.org>
Subject: Re: [RFC] tcp: syncookies: Interesting serious errors when generating and verification cookies

> What I don't understand is that even if you yourself concluded that the
> implementation provides correct result for any possible values, you
> still insist on calling it "wrong". Why?

I used to think this was a coincidence, so I always thought it was a "clever" bug.

> Rather than "coincidence", I would call this optimization based on
> trivial identity

> (a - b % m) % m = (a - b) % m
>
> together with the usual trick that if m is a power of two, "% m" is
> equivalent to "& (m - 1)". To put it simply, if we know we are going to
> mask out upper bits eventually, there is no reason to do the same with
> one of the operands before the subtraction.

Thank you, I now know this is an optimization.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ