From: Eric Biggers <ebiggers@kernel.org>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: "<linux-wireless@vger.kernel.org>"
<linux-wireless@vger.kernel.org>,
Kalle Valo <kvalo@codeaurora.org>,
"open list:HARDWARE RANDOM NUMBER GENERATOR CORE"
<linux-crypto@vger.kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>
Subject: Re: [PATCH] wireless: airo: switch to skcipher interface
Date: Sun, 16 Jun 2019 12:43:22 -0700 [thread overview]
Message-ID: <20190616194322.GC923@sol.localdomain> (raw)
In-Reply-To: <CAKv+Gu97xkz5qxycyjqmukFhWAD6p=eYbTqoPWt-ZNbBFDbNAw@mail.gmail.com>
On Sun, Jun 16, 2019 at 09:03:58PM +0200, Ard Biesheuvel wrote:
> >
> > Otherwise this patch looks correct to me.
> >
> > The actual crypto in this driver, on the other hand, looks very outdated and
> > broken. Apparently it's implementing some Cisco proprietary extension to WEP
> > that uses a universal hashing based MAC, where the hash key is generated from
> > AES-CTR. But the MAC is only 32 bits, and the universal hash (MMH) is
> > implemented incorrectly: there's an off-by-one error in emmh32_final() in the
> > code that is supposed to be an optimized version of 'sum % ((1ULL << 32) + 15)'.
> >
>
> I stared at that code for a bit, and I don't see the problem.
>
I'm fairly certain that the line:
if (utmp > 0x10000000fLL)
is supposed to be:
if (utmp >= 0x10000000fLL)
Since it's doing mod 0x10000000f. It's supposed to be an optimized
implementation of 'val = (u32)(context->accum % 0x10000000f)' where 0x10000000f
is the prime number 2^32 + 15. It's meant to be the MMH algorithm: Section 3.2
of https://link.springer.com/content/pdf/10.1007/BFb0052345.pdf. But there are
values of 'accum' where it gives the wrong result, e.g. 14137323879880455377.
Possibly this is a bug in the Cisco MIC protocol itself so can't be fixed.
> > Do we know whether anyone is actually using this, or is this just another old
> > driver that's sitting around unused?
> >
>
> Excellent question. I take it this is pre-802.11b hardware, and so
> even the OpenWRT people are unlikely to still be using this.
- Eric
next prev parent reply other threads:[~2019-06-16 19:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 9:36 [PATCH] wireless: airo: switch to skcipher interface Ard Biesheuvel
2019-06-16 7:12 ` Eric Biggers
2019-06-16 19:03 ` Ard Biesheuvel
2019-06-16 19:43 ` Eric Biggers [this message]
2019-06-17 8:32 ` Ard Biesheuvel
2019-06-16 20:08 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190616194322.GC923@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=ard.biesheuvel@linaro.org \
--cc=herbert@gondor.apana.org.au \
--cc=kvalo@codeaurora.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox